Use typed memoryviews for Cython arrays.

Convert the "old-style" syntax for converting Numpy arrays
to Cython / C arrays to use memoryviews instead. (See
http://docs.cython.org/src/userguide/memoryviews.html for
more information.) This cleans the code and, in some cases,
can improve performance.

Update the setup script as well.
Have to return a numpy array to python, not a memoryview; also fixed string->number in file parsing
Had to specify int32 to avoid type errors