move codegen tasks to new options

Move codegen tasks to new options

Testing Done:
I considered adding integration tests, but for these options, but the expected behavior changes in many cases consist of side effects that are non-trivial to verify (other than thrift-linter).

For "thrift-linter", I ran the "thrift-linter" goal on the various thrift-linter targets in testprojects/. I verified that I could override the "bad-thrift-strict" target using "--no-thrift-linter-strict" and get it to succeed (and vice versa with the "bad-thrift-default" and "bad-thrift-non-strict" targets.

For "gen.scrooge", I ran the "gen" goal on tasks under examples/ and testprojects/. BTW, I could not get any output from the compiler to show up ever. I verified things were working by using the "-ldebug" flag to pants and see that it was indeed adding "--verbose" to the compiler invocation.

For "gen.protoc" and "gen.thrift", I ran the "gen" goal on tasks under testprojects/. I verified that the expected flags were passed to the thrift and proto compilers using the "-ldebug" flag.

Aside: for the "gen.protoc" target, I saw a strange result when indicating "--gen-protoc-lang=python" for a target where Java was actually needed:
  Exception message: 'PythonLibrary' object has no attribute 'jar_dependencies'
But this is unrelated to my change and happens with the code on master, too:
  $ devpants goal gen testprojects/src/protobuf/com/pants/testproject/proto-ordering:protos --gen-protoc-lang=python

Reviewed at https://rbcommons.com/s/twitter/r/1203/
Validate that registered args begin with dashes, as appropriate.

Otherwise we get a cryptic error further along.

Testing Done:
CI baking. Verified that bad registration triggers these validation checks.

Reviewed at https://rbcommons.com/s/twitter/r/1211/
Migrate more tasks, including all android tasks, to new options.

Renamed --vm-options to --jvm-options, for uniformity.

Testing Done:
Manual testing.

CI baking.

Reviewed at https://rbcommons.com/s/twitter/r/1214/
Fix reading of scalac plugin info from config.

The relevant keys are now:

[compile.scala]
plugins=['foo', 'bar']
plugin-args= {
  'foo': ['bar']
}

Testing Done:
Manually verified that the args are picked up.

Reviewed at https://rbcommons.com/s/twitter/r/1217/
Configurable Compression Level for Cache Artifacts

Allow changing (or disabling) the compression level of tarball artifacts via pants.ini

Also, require passing compression level in most init/callsites rather than allowing various default args to proliferate.

Default compression level in python gzip appears to be 9, so that is the default on TarballArtifact (replacing True).
The default when reading the config is currently 5, as we suspect that we're CPU rather than IO bound, but this change will also make it easier experiment with different values to find confirm that / find the optimal value.

Testing Done:
https://travis-ci.org/pantsbuild/pants/builds/38756549
https://travis-ci.org/pantsbuild/pants/builds/38964649

Reviewed at https://rbcommons.com/s/twitter/r/1194/
Update config migration script with new scalac plugin options.

Reviewed at https://rbcommons.com/s/twitter/r/1218/
Ensure proper semantics when replacing all tasks in a goal.

Testing Done:
ci in flight.

Reviewed at https://rbcommons.com/s/twitter/r/1220/
Take proper care with the order of operations when replacing tasks.

This logic is fragile and should probably be removed entirely.

Testing Done:
Manually verified that this fixes foursquare.web's issues with replacing all tasks in a goal.

ci running.

Reviewed at https://rbcommons.com/s/twitter/r/1221/