Switch tests to use Mocha, fixes #197

Looks like there maybe a small problem with should.js, as with #160
(function(){}).should.be.a('function') fails because .should.be is
an object instead of a function, but this works if you replace it with
(function(){}).should.be.a.Function. This is fixed here, but I don't
know why it would be a problem to begin with.

All socket tests were merged into test/socket.js, for better or for
worse, but can be split back up into individual files if useful. This
gave the moch spec reporter better grouping than having related tests in
separate files.
Move socket close out of afterEach, fix done reference

Signed-off-by: Eli Skeggs <eskeggs@globesherpa.com>
Debugger mode
Continued fix for #197, from PR #237.

Fixed timeout failures and rebased to current master.
All socket tests were splitted up again because the combined version has become bloated. It can be combined again
if better grouping is desired.
Merge pull request #309 from yoneal/fix-197

Continue switching tests to Mocha