Refactor Java build rules to greatly reduce overbuild

This makes use of ninja's "restat" feature to eliminate rebuilding of
dependent java libraries when a library's interface jar is unchanged.

We previously approximated this behavior by having scripts use md5sum.py
to early-return when input md5s didn't change.

Bug: 810890
Change-Id: I08456c172f52e581c84b6a0daf9376e38d7b3df3
Reviewed-on: https://chromium-review.googlesource.com/1060697
Commit-Queue: agrieve <agrieve@chromium.org>
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564877}
GitOrigin-RevId: 1d29c5f58575e804a8657f33ccbf9f450b39251c
2 files changed