Fix an invalidation bug.

It was causing spurious invalidation, especially of ivy, where you'd build
successfully, change nothing at all, build again and ivy would re-resolve.

The problem was that were were treating Pants targets as things to
invalidate on, and they unfortunately have the same id as the target
they point to...

TODO: Get rid of Pants in the target graph. It exists only as a BUILD
file parsing construct, it shouldn't affect things later on.
Slight tweak to dep analyzer.

Also, more informative docstrings.