Add support for sending output to file

In some situations its necessary to have the mocha output sent to a
file rather than just showing on the console.  For instance, when using
Jenkins as a continuous integration server to run the Titanium builds,
one must use a reporter such as XUnit and redirect the output to a file
which Jenkins can then read once the tests are complete, and report
back to the user.  In order to accomplish this, titanium.js was
modified to accept an “outputFile” setup option which, if present, will
be used to send console output.  Since the reporters send the test
results to console, these messages will then be additionally appended
to the file.

Also, to give the user ability to listen to events on the mocha runner,
return the runner on the call to run the tests.  This can be used to
listen for the “end” event which would notify the user that all tests
are complete.  This is also important in continuous integration to
notify when the simulator is finished running the tests.

Tests were added to the existing app.js test to verify messages were
written to a file and the events are available through the returned
runner.