Fixup Dependencies to be mainly target-type agnostic.

The only dependency now is a mapping of known payload
types that represent external dependencies.

Expand the unit test and improve it to verify ordering.

https://rbcommons.com/s/twitter/r/920/