Fix up error handling in AsyncResult

Get the AsyncException to correctly serialize so it can be passed around and
stored on things like the async marker.

Also add tests to ensure that exceptions are raised correctly.