Move lib.m into lib directory to begin refactor

This will result in some lost history, but can't see a better way.
Seperate lib.m into function files

Learned a bit about how Octave handles function scope and permission.

As a result, seperated lib.m into a number of function files './lib/*'.
A few are in './lib/private/*' as well.