Reworked lapack wrappers (now called lapack), added custom allocator for 64 byte aligned data.
Weak gradient now uses preallocated matrices, using new dense matrix implementation with aligned data and column capacity separate from number of active columns.