Fixed missing dependency of tests on libmathicgb that caused test not to be recompiled in some cases.
Fixed issue where memory consumption would suddenly explode due to converting a submatrix of a very sparse and large matrix into dense format. Very sparse matrices now have their own code-path that avoids this.