A base class for tests that test a single task type.

Subclasses advertise the task type they care about in setupClass().

Deals with option registration and scoping for the task under test.

Also addresses some small code review comments from a previous commit.

Testing Done:
ci.sh passed.

Reviewed at https://rbcommons.com/s/twitter/r/1168/
Sync of https://github.com/pantsbuild/pants/commit/62a4fd054850bf6dc96c5bd79cd818ada73a4467