Mocha tests for the CookieParser, slight refactor.

Mocha and should.js are going to be requirements for Tachi development
from this point onwards. They seem to make a fairly coherent test
platform, however, I cannot seem to find a nice way to make bulk test
cases. Refactoring this much code will take a while, but the added
stability will be nice. I wish there'd been more node.js test-driven
stuff when I started Tachi a couple of years back.