make abstract dialect more abstract

This fixes two problems in particular:
  - there was no existing way to access information about the model
    you were generating a limit and offset for, so the model has been
    added to the options
  - included where generation was done from raw SQL, making it impossible
    to support other dialects that don't support the same LIMIT syntax
Merge pull request #2588 from mbroadst/update-select-query

make abstract dialect more abstract