The sum-of-squares meta-algorithm for computational problems