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/
Sync of https://github.com/pantsbuild/pants/commit/efbf949a660fd245de5d83dc68a1430680664786