Add the ability for JVM targets to refuse to allow themselves to be
cached in the artifact cache.

Sometimes, we'll later generate resources that ought to be added to an
artifact (e.g. args-apt in commons).

In the long run, the artifact cache will be able to cache resources
and this will be moot.

Testing Done:
Ran new tests.

Reviewed at https://rbcommons.com/s/twitter/r/1206/
Sync of https://github.com/pantsbuild/pants/commit/97af5ed27e850726b02fff4c23bf8472ced1cba3