Fix java_application() compression, add TMP to java_test()

Misc. changes necessary to build Gerrit Code Review with Buck.

Still waiting on a CLA, but wanted to let you know these are pending.