(For Micah) Cache the dependency graph more

@mwylde 

I narrowed the performance issue we have down to the the transitive closure operation on the dependency graph. Whenever we update a HAML file, the dependency graph rebuilds, even if it was only content that changed, not directives. This invalidates the graph only when we notice a change in directives.
I'd prefer not to have an inscrutable boolean flag. Use a named argument (`:invalidate_graph => true`)