Implement Gem#state and Gemfile#dependency_states (rev 1)

Infers state of gem and gems in gemfile from various targets
in distgit/koji build process.

Revised to incorporated changes to new workflow, resolve outstanding
TODOs / edge cases, and cleanup style.

General algorithm should now be flushed out, though code could
use some cleaning up / refactoring.