Indefinite Stochastic Linear-Quadratic Control: Theory, Computation and Applications