Refactor status logic into a class.

Also introduces custom exceptions and adds error raising to Connection#post.
Merge pull request #5 from jonmagic/refactor-status

Refactor status logic into a class.