Make cleanup() async, add cleanupSync()

This changes the behavior of `cleanup()` to be asynchronous with a callback, retaining the synchronous version as `cleanupSync()`.

This supports #32 and will be released as part of v0.8.

Feedback welcome; plan release shortly.