docs: cocoa example uses wakeup callback API

Also, imitate the qt example somewhat.