Add an async API

This is currently just a skeleton, with no implementation -- it is just intended for discussion.