Adding a synchronous mode for noder-js.

This commit refactors promises to allow both synchronous and
asynchronous modes (with then and thenSync methods).
When configured to use synchronous requests, noder-js is now
able to load modules completely synchronously.