Implement name hashing for cross-project boundries.

Before, the name hashing optimization wouldn't kick in if you were
modifying files in one project and recompiling dependent projects.

Now it does.