Implement class for checking consistency of the graph

Summary:
This class can be used at any step where the graph should be consistent.
This can help us find mistakes when we develop algorithms that change the state
of the graph.

For now this does not assert if an inconsistency is found, but in the future
when the project is more robust, it should.

Test Plan:
Just run the daemon, start a build and look at the log for any
inconsistency found.

Reviewers: NicolasDP

Reviewed By: NicolasDP

Differential Revision: http://91.121.199.76/D37