Configure publishing to MavenCentral

- Rework build.gradle to use old maven plugin
- Setup publishing to Sonatype OSS in build.gradle

@raymondfeng FYI. Feel free to review and comment. If you find anything to fix/improve, I'll implement changes in a new pull request.