Introduce c_WaitHandle::asWHKind()

Summary: Move all static casts from c_WaitHandle to c_FooWaitHandle to a single
function called c_WaitHandle::asFoo(). Makes all these huge switches
more readable.

Reviewed By: @billf

Differential Revision: D1425048