java bindings: add public close() support to Content objects.  Make synchronization when dealing with handles more granular.