Synchronous API

Not sure if this is useful for you, but I needed in another project so I implemented an API similar to 'node-resolve', refactoring as much as I could for code reuse.

The biggest difference in this patch is that it adds a 'sync' function which does the resolution synchronously. I refactored all tests into 'describes' with a sync version for each.