More type drudgery

Also, I made async_op a template so we can specify the expected argument
type to resume_cb. :)