Factor pin stuff to lib/pin.js

General rule: 'util.verbFoo()' is less ideal than 'foo.verb()',
especially once there is more than one verb to be done with foo.

This sets the stage for a proper db refactoring, so that tests can
be more guaranteed to not clobber the "real" db.

Fix #68
Merge pull request #75 from isaacs/pin-factor

Factor pin stuff to lib/pin.js