Misc internal db cleanup

- make a few methods class methods
- give matches_exclude? a sane default when just passed a file
- move some functions so there's more of a logical grouping
Call metadata instead of using instance_eval
Merge pull request #86 from eapache/db-test-cleanup

db test cleanup part 1