Added __getstate__ and __setstate__ for pickling
Added pickle tests
Merge pull request #2 from JohnEmhoff/master

Add __getstate__ and __setstate__ to support pickling