lib/java: cleaning up AbstractInputProtocol and AbstractOutputProtocol
lib/java: first pass at a GWT JSON protocol