data: renamed _registerPackage and friends

Renamed _registerPackage to _registerPackageVersion so that later we can
add code for registering a package with no versions.
test,npm: fixed `npm publish` for a new package

Created scaffolding for running unit-tests.

Fixed a bug in the npm protocol implementation where it was not possible
to publish a new package via `npm publish`.
test: expired AuthSession cookie should be renewed

Added a unit-test to verify that an expired AuthSession cookie is renewed
when running `npm publish`.