src: make queue.h c++ compatible

This is a cherry-pick of commit joyent/libuv@0520464.
src: add ASSERT/CHECK/UNREACHABLE macros
process: add process._heapInfo() method

Binding to v8::V8::GetHeapStatistics() to help with core debugging.

Might also be useful for profiling and monitoring tools but keep in
mind, dear reader, that the underscore in the method name means it's
not part of the official API.

Fixes #6414.
src: add gc statistics hooks

Work in progress, nearly feature complete.