Clear revents when registering a new socket.

Reviewer: @rlane

Otherwise, stale revents would trigger an immediate call to the newly registered callback.