(TK-108) Add support for persistent Java clients

This PR adds support for both synchronous and asynchronous persistent Java clients.
Hopefully, this nastiness can go away when the replacement for #24 is rebased on top of this and brought in.