Memory management changes and extra error checking

There was a memory leak in the previous version, where if the LU decomposition failed L and U wouldn't get freed.

Also with the changes [here](https://github.com/substack/ndarray-crout-decomposition/pull/1), it should be possible to run the LU decomposition in place, thus saving a bit of memory.

In a few places it is possible to use ndscratch.malloc instead of ndscratch.zeros, thus avoiding unnecessary initialization.

I also added in X as a parameter so that if the system needs to be repeatedly solved then extra vectors won't get allocated.  A default vector is returned from the memory pool and so the user can free it if they want.