Improved const invariants

@bsoetaer 
Added new functionality for defining commonly used contracts in a single line.  'const' and 'require_square' are now implemented using this system.
Yeah I guess you are right. The contract shouldn't force any design decisions inside the matrix class. I was thinking because we were specifying the valid inputs in the precondition that if we took it out it would break. But the code could also either implement these checks or not because the documentation says it will break if you hand it something that violates the contract so it should be expected to break if you violate the contract. 

Those "Typing" notes cleared some of the confusion up for me for sure as he says that the point is design by contract, not defensive programming so it's okay to break if the contract is violated. Thanks for pointing them out to me as I hadn't looked at them yet. Also thanks for clearing things up for me. I was just worried we might be doing a lot of work that wouldn't be acceptable.