Allow return status to be specified using quitWithStatus

Call `quitWithStatus(1)`, for example, to exit the program with a 1 status code. This is useful for unit tests and servers. Currently not implemented for Mac platform. Note that I haven't tested the Linux build yet because of VM issues, so I may rebase this at some point so it actually works on Ubuntu dedicated.