Async Library

This PR involved a **lot** of work to implement the [async](https://github.com/caolan/async) library to replace the internal bespoke asynchronous management framework (which was hideous) as detailed in issue #137.

I've also made some other random improvements, optimizations and fixes along the way.

Unfortunately, due to the size of this rewrite there's a high chance some bugs have been introduced. During testing I found a few and fixes are included in this PR. No known bugs exist, but I wouldn't be surprised. This work is definitely worth the risk though as future maintenance will be much easier.