Canonicalize transaction types.

Now, if the type "hash" and a more specific type (e.g. "sha256") are
present, the more specific type will remain and the generic type will be
removed.  This allows creating databases that can be imported by earlier
versions of newfol.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>