allow singular quad_form

All tests pass, including a newly added test.  This also moves the scale of matrix outside of the quadratic form.  If cvxpy were clever about constant folding then it could probably do some cancellations so that badly scaled problems like https://github.com/cvxgrp/cvxpy/issues/45 might have a better chance to work.