Patch MathObjects

This fixes some MathObject issues:

*  Prevents Matrixes from passing on cached MatrixReal1 objects (that are used for inverses, and so on).  (See this [forum post](http://webwork.maa.org/moodle/mod/forum/discuss.php?d=3162).)

* Fixes a problem with undefined values in FormulaUpToConstant.  (See this [forum post](http://webwork.maa.org/moodle/mod/forum/discuss.php?d=3226).)