Add require() tests and comment buggy test in fs-spec-03.js

http://code.google.com/p/phantomjs/issues/detail?id=47
Merge phantomjs-nodify's require() and fix tests

Most of the tests passed after merging almost unchanged phantomjs-nodify
code, some needed small changes. The one that is still failing is for
CoffeeScript modules.

http://code.google.com/p/phantomjs/issues/detail?id=47
Add test for .stack in errors thrown in modules

We want to be sure that the stack contains module file path.

http://code.google.com/p/phantomjs/issues/detail?id=47
Add Phantom::loadModule

Instead of trying to use sourceId to determine what module threw an
error, we now load module's source code using modified
QWebFrame::evaluateJavaScript and leverage PhantomJS's stack traces.

http://code.google.com/p/phantomjs/issues/detail?id=47
Fix indentation to 4 spaces in new require() tests

http://code.google.com/p/phantomjs/issues/detail?id=47
Refactor nativeRequire() and restructure bootstrap.js

nativeRequire() has been refactored so that native modules are also
wrapped in Module objects. Additionally, native modules are also
cached and included in stack traces if an error occures inside them.

Phantom::loadModuleSource() has been renamed to
Phantom::readNativeModule() so that it's clear that it's used only to
load native modules.

Finally, all the require() code has been move after setting error
handlers in bootstrap.js so that if an error occurs in the require()
code, the stack trace is printed.

http://code.google.com/p/phantomjs/issues/detail?id=47
Fix stack trace when module is not found

The stack trace was missing when an error was thrown because of a
missing module. This should not be the case anymore.

http://code.google.com/p/phantomjs/issues/detail?id=47
Remove old module tests

New module tests contain all the tests from the old ones.

http://code.google.com/p/phantomjs/issues/detail?id=47
Run modules in an empty context

Previously `this` in modules was set to the global `window` object. Now it
is set to an empty object instead.

http://code.google.com/p/phantomjs/issues/detail?id=47
Refactor loading of native PhantomJS modules

Now PhantomJS modules are loaded just like any other modules, which
means they should be able to require other native modules inside them if
needed.

http://code.google.com/p/phantomjs/issues/detail?id=47
Add support for CoffeeScript modules

Instead of using a C++ wrapper, I used a Node version of CoffeeScript
with a small JS wrapper (src/modules/_coffee-script.js). This way, since
the module system is similar enough to the Node.js module system, I only
need to require CoffeeScript in bootstrap.js and all the support for
.coffee is added by CoffeeScript itself.

To include a newer version of CoffeeScript in the source tree, see
tools/import-coffee-script.sh.

http://code.google.com/p/phantomjs/issues/detail?id=47
Include the browser version of CoffeeScript too

This is still needed so that injectJs() methods work with CoffeeScript
and so that the main script file can be in CoffeeScript.

It causes duplication of code and some consideration is needed as to
how we could refactor the old inject code so that it uses modules
underneath. Lots of the module functionality written in JS could replace
the old C++ code (CSConverter, most functions in Utils).

http://code.google.com/p/phantomjs/issues/detail?id=47
Add a simple example to show how the module system works.

http://code.google.com/p/phantomjs/issues/detail?id=47