fix signature in 'goal targets' and BUILD dictionary

We construct the arg signature for Targets by walking up the class inheritance chain, accumulating info. But if more than one class in the chain mentions a param, then... we were showing it more than once in the arg signature, whoops. This had other side effects: we doc'd some params we meant to hide.

With this change, the Target-class-walking code got big enough such that I separated it out into its own function.

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

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