modify activerel queries: threadsafe, simpler
fix activerel query first, last, add specs
improve coverage, activerel errors
Merge pull request #461 from subvertallchris/activerel_query

modify activerel queries: threadsafe, simpler