Move helpers
Extract query methods
Remove temporal variables.
Better naming
Extract result set query from API.
Extract API into Query#search.
Fix :only_ids option.
Remove conditions to limits.
Clear SQL in relations.
Extract Query#ids method.
Better names, refactor conditions.
Refactor query: remove duplicates.
Merge branch 'pose-query'

* pose-query:
  Refactor query: remove duplicates.
  Better names, refactor conditions.
  Extract Query#ids method.
  Clear SQL in relations.
  Remove conditions to limits.
  Fix :only_ids option.
  Extract API into Query#search.
  Extract result set query from API.
  Better naming
  Remove temporal variables.
  Extract query methods
Merge pull request #10 from einzige/master

First step of refactoring