PDB-67 Converting to using a bigint for catalogs table primary key

In preparation for differential updates to catalog related data (metadata and
edges) this patch converts the usage of the current catalog hash as primary
key over to using a bigint sequence instead. This allows us to update foreign
tables keys without having to also update the foreign key table.

This also has some index and table sized benefits, as the catalog hash is not
replicated multiple times but stored once. Instead the bigint is what is
replicated which is smaller (8 bits versus a 40 bit sha1 hash in this case).

Signed-off-by: Ken Barber <ken@bob.sh>
PDB-67 Remove match simple definitions from create table

This is to avoid confusion, and since we don't care about the match status for
these single column foreign keys anyway the setting is superfluous.

Signed-off-by: Ken Barber <ken@bob.sh>
PDB-67 Switch add-resources! and add-edges! to use catalog id instead of hash

For performance reasons, its better if we use a catalog id for both the
functions add-resources! and add-edges! so we can avoid the need to do a
select beforehand.

With this in mind this patch changes the behaviour of add-catalog-metadata! to
return the full generated id's so we can pluck out the id and use that later
for add-resources! and add-edges!.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #746 from kbarber/ticket/master/PDB-67-change-catalog-to-use-ids

PDB-67 Converting to using a bigint for catalogs table primary key