Expose the close() method and implement Closeable

Also some minor cleanups for unused things.
Merge pull request #28 from spotify/drewc/autoclose

Expose the close() method and implement AutoCloseable