Circular dependency issue fix, RequireJS support, and other fixes.

This pull request contains support for RequireJS and fixes some issues.

The first issue U found was that the key used in the cache was inconsistent. In some places the file path in the gulp file was used, and in other places the path reference as found in a file which may be absolute or relative. This resulted in cache misses and duplicate hash entries. I changed cache lookups to always use the absolute path.

Secondly the recursive dependency lookup stopped when it found a circular reference. In the case of a.html -> b.html -> a.html, when computing the hash for a.html it will try compute the hash for b.html but then recursively find a.html again. The cycle will be detected and a will not be hashed again. b.html will be hashed and it will be included in the hash for a.html. However, b.html contains a reference to a.html. When this reference is replaced, it modifies the content of b.html, so the hash of b.html should change, but does not. When you next deploy your site the old cached version of b.html will be found that links to the old version of a.html and result in a 404. I solved this by keeping a list of files in the cycle. Once a.html is done hashing, the hash of a.html will be back propagated to all the files in the chain.

The fix for circular dependencies caused some breakages in the unit tests. The reason for this is that when circular references are present, the order in which you hash files affects the hash value. So hashing a.html first will lead to a different result than when you hash b.html first. For this reason I export the cache from the tool so that hashes can be looked up instead of recomputing individual file hashes which may not be consistent across runs. I refactored all the test cases to not recompute hashes but look them up.

A missing feature that bugged me was setting the base path of references in your file tree. I've added support for multiple base paths via options.base. I also added a feature that lets you write your an aggregate hash of all files. I use this to check for updates from my app. There are also other small style fixes.

I hope you like.