Updated NDK matrix algorithms

Added determinant and matrix minor algorithms from Andrew. Need to test
to verify accuracy.