Replace 'register' with 'update'

The command-line command is renamed for consistency with GHC.
The "register" hook name is kept, but its semantics is changed.
Use handwritten JSON instances for db

Fixes #8