lib/java: fix JsonRpcOutputProtocol
lib/py: writeDouble -> write_double