Fix bootstrap: global should be this, not window

In a javascript context, all JS function are not all attached to the window object.
This is the case of 'native' functions. In SlimerJS, the 'require' function is
not attached to the window object. It is a standalone function.
Bootstrap.js: specific support of patchRequire for SlimerJS

SlimerJS provides an API to indicate paths where modules
can be found: require.paths (CommonJS specification).
So patchRequire is not needed for SlimerJS.
refs #482: Adds an --engine=.. option

It will allow to choice different browser engines, instead of phantomjs
refs #482: supports of --engine=slimerjs

This options allows to use SlimerJS (gecko) instead of PhantomJS (webkit)
refs #482 - fixed issues pointed by jshint
refs #482: sync with master
Refs #482: creation of default UA should take care about SlimerJS
Add missing backslash in assertMatch example

Forgotten backslash breaks syntax coloration in assertMatch() example.
Refs #482: CasperJS should wait after the browser initialization

The call of webpage.open() (or openUrl()) is synchronous in PhantomJS,
but is asynchronous in SlimerJS (it needs to open a real window etc..).

So CasperJS should not launch the next step just after the call of
webpage.openUrl(). A flag is set to true before this call, and
then set to false when receiving the first event from the page loader.
And this flag has to be checked before to execute the next step.
Refs #482: CasperError should be declared as a global function
Refs #482: colorizer: fixes a warning

With Gecko, a warning appears when an option does not exists
in styles.
Refs #482: selftest server should read png as binary file

PhantomJS has a strange behavior on fs.read: it seems it reads
file always as binary file. However SlimerJS's fs.read strictly
respect the 'b' flag. So the web server of selftest should
return content of binary files as... binary data. Else images
are not sent correctly to the browser and Gecko cannot display
them. and then some tests fail, like tests on assertVisible.
Refs #482: fixed a regression in clitests

One test of clitests loads about:blank. However, there
is no navigationRequested event and so our new browserInitializing
flag is not toggled to false, and then checkStep() is blocking
tests. Let's toggle it inside onLoadStarted too.
fixes jshint issue
Fixes reference errors in testers.js

stackArray is not a standard property of the Error object. It is
added by PhantomJS (modification in the sources of QTWebkit).
We should use the stack property if stackArray is not present
(like in SlimerJS)
Refs #482: new property phantom.casperEngine storing the engine name

It will easier in the code to know the current engine.
Refs #482: fixes utils.betterTypeOf() for SlimerJS

In SlimerJS, the webpage object has no type 'qtruntimeobject' written
in the string form of the object. But it has a __type property.
The function should check this property when the engine is not PhantomJS.
Fixes an infinite loop with checkStep

the navigationRequested boolean should be false when the new URL
has only a difference on the hash part with the previous URL, because
in this case we don't have a loadStarted/loadFinished event (at least
with Gecko) and then navigationRequested cannot be turn into false.
The consequence is that checkStep doesn't execute the next step because
of its test on navigationRequested.
Fixes a ReferenceError with Gecko in casper.js
Fixes jshint issues