testdb: test foreign key constraints on Observation

Take the opportunity to re-factor the unit tests to be a little more
sensible *re* rolling back sessions, deleting text fixtures, etc.