Made Global handlers return futures

The results refactoring ended with Global handlers, such as onError, onHandlerNotFound etc, returning SimpleResult, which meant they couldn't be asynchronous.  This changes the type to Future[SimpleResult].

Also extracted code samples out of Java Global docs, and updated all docs for this.