Add cancellation support to AwaitableAutoResetEvent.

Background writer takes advantage of this.
Move public API of AwaitableAutoResetEvent to top of file.
AwaitableAutoResetEvent is lock-free.

No particular reason. I just wanted to see if I could.