Condition number theorems in linear-quadratic optimization