primary keys: hash string -> autoincrement integer

Adds an autoincrement integer for the primary keys,
and a field 'hash' that replaces the former primary key (strings).
This permits to stay generic and still use the field "hash" in firewoes.
add: test_orm.py (test suite for the orm)

This script adds the analysises in examples/ to an in-memory db, queries it,
and ensures the returned values are correct.