Added very basic Maven publishing to build script.

Still needs to need requirements: https://docs.sonatype.org/display/Repository/Central+Sync+Requirements
Merge branch 'publish-preparation'
Added missing Beta annotations and updated Guava to 16.0.1.
A tiny bit of refactoring.
Some test code refactoring, and added a test to check for NPE on null input stream on deserializer.