protect the cookie.seen predicate writes with cookie.mutex
protect the cookie.seen predicate writes with cookie.mutex

Summary:
This fixes up the cookie wakeups; we were just setting seen to
true then notifying the waiter.  Since seen is not intrinsically atomic
this may be observed by the waking thread.

Guarding the write with acquiring and releasing the mutex makes this a little
more correct.

Reviewed By: sid0

Differential Revision: D4282316

fbshipit-source-id: 293952340e758efec2e55aaa78099f2af4121386

nodakai/watchman,wez/watchman,wez/watchman,kwlzn/watchman,wez/watchman,wez/watchman,facebook/watchman,nodakai/watchman,wez/watchman,kwlzn/watchman,kwlzn/watchman,facebook/watchman,facebook/watchman,facebook/watchman,nodakai/watchman,facebook/watchman,kwlzn/watchman,nodakai/watchman,wez/watchman,kwlzn/watchman,nodakai/watchman,facebook/watchman,nodakai/watchman,facebook/watchman,wez/watchman,kwlzn/watchman,facebook/watchman,nodakai/watchman,wez/watchman,nodakai/watchman,facebook/watchman,nodakai/watchman,kwlzn/watchman,wez/watchman