Various improvements to test code.

Hi Jason,

I think I know my way around your code now, which is good because now I can confidently assert that it's generally correct.  :)

I fleshed out a bunch of things and added some tests.  I'm totally new to cython and not an expert on Python in general, so please let me know if I did anything wrong or am using poor style.

Also, feel free to reject the read/write/new shortcuts that I added, if you think the interface should be different.  But, I felt like there was an opportunity to simplify the interface for Python users who have nothing to gain from all of the fine-grained control of allocation that the C++ interface provides.