Statistics for Quadratic Loss Minimization in a Regime Switching Model with Control and State Constraints