Adding a synchronous mode for the request module.

It is now possible to specify the sync option for noder-js/request,
and a synchronous request will be made. The return value will still
be a promise (not to change the signature), but it will already be
in the resolved state. Promises now have doneSync and failSync
methods which, when called on an already resolved promise, call their
callbacks synchronously.
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.
Allowing the browser version of noder to be executed outside of a browser.

It will no longer fail if window or document is not defined.
Passing the full module to loadUnpackaged instead of only the module name in loader.js
Creating the root module before the loader and resolver.
Scripts are now executed after the main module and the onstart method.