src: make queue.h c++ compatible

This is a cherry-pick of commit joyent/libuv@0520464.
src: add ASSERT/CHECK/UNREACHABLE macros
asyncwrap: add missing TryCatch

The TryCatch was not being checked after calling the unload asyncQueue
callback in AsyncWrap::MakeCallback.
Merge pull request #11 from joyent/master

sync