lib/java: Protocol: writeMixed ImmutableMap support