Add whois command.

Events are now emitted using process.nextTick to clean up the stack on
error.