throw event onExit when the phantomjs background process dies or crashes

In this commit, when the background phantomjs process dies or crashes, the function phantom.onExit is called if its been implemented by the user. 

Otherwise the user's NodeJS process which is interfacing with the phantomjs process via the library is left hanging forever.