create abstract class for orm stuff

also did a little iterator cleanup, fixed tests appropriately.
Unfortunately this is a breaking change, but it will clean up the gorm
and hibernate services a lot and make them work similarly

Issue #80