Adds custom list and dict option types.

Values (in cmd-line args, env vars and config files) must be JSON lists/objects.

Currently our config reader 'parses' list and dict values using python 'eval', so we
change all of those in our pants.ini to be valid JSON. Fortunately they remain valid
eval-able python too. Eventually we'll get rid of that eval-ing code, but for now
we need to support both, during the transition.

Adds checks in migrate_config.py for list/dict values that aren't valid JSON.

Note that the list type is different from action='append'. The latter
appends cmd-line arg values to the default. The former replaces the
default.

Testing Done:
CI passes.

Reviewed at https://rbcommons.com/s/twitter/r/1389/
Subclasses of Exception have strange deserialization

We pass these back from subprocs so they need to ser/de correctly, but Exception has special
deserialization. UnreadableArtifact is basically just a sentinel value so subclassing Exception
just adds complexity.

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

Bugs closed: 826

Reviewed at https://rbcommons.com/s/twitter/r/1395/
Replace twitter commons dirutil Lock with lockfile wrapper

Every now and then we see a pants process die without cleaning up its pidfile and subsequent runs in the same workspace hang forever.

This change replaces the twitter-commons dirutil.Lock with a thin wrapper around lockfile's PIDLockFile which prints the owner process commandline or breaks the lock if the owner process doesn't exist.

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

Bugs closed: 816

Reviewed at https://rbcommons.com/s/twitter/r/1390/
docstring: in python_binary(platforms=...) param doc, add an example

add an illustrative example to docstring. What I learned from https://github.com/pantsbuild/pex/issues/16

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

Bugs closed: 591

Reviewed at https://rbcommons.com/s/twitter/r/1386/
Convert setup_py to a task.

Doesn't yet delete the old setup_py command. We'll do that once this code is in and verified to work in production.

Note that python_setup.py and test_python_setup.py are just lightly modified copies of setup_py.py and test_setup_py.py.

Testing Done:
Modified unittests passed. CI passed.

Reviewed at https://rbcommons.com/s/twitter/r/1394/
Add missing import for dedent in resource_mapping.py

Testing Done:
travis is running: https://travis-ci.org/jinfeng/jinfeng-pants-fork/builds/42118486

Reviewed at https://rbcommons.com/s/twitter/r/1403/
Migrate checkstyle's use of self.config to self.get_options() for fetching from pants.ini.

The options names should be backwards compatible.  However, the task doesn't seem to be wired in to any
goal at the moment, so I can't add a section name to the migration script.

Testing Done:
CI passed.

Bugs closed: 828

Reviewed at https://rbcommons.com/s/twitter/r/1399/
Allow setting the cwd for goals run.jvm and test.junit

Testing Done:
Added new integration tests
CI passed at https://travis-ci.org/pantsbuild/pants/builds/41324560

Bugs closed: 797

Reviewed at https://rbcommons.com/s/twitter/r/1344/
Switch pants's release and ci processes to the new setup-py goal.

Testing Done:
ci.sh passed.
Dry run of release.sh passed.

Reviewed at https://rbcommons.com/s/twitter/r/1402/
doc: what a command line looks like nowadays

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