start switching over to QueryBuilder

Use QueryBuilder for constructing the temporary
contact ids table, but in this commit only at
a surface level: leave buildWhere alone for now.

This commit pushes the LIMIT handling up from
contactsdatabase to contactreader (contactwriter
does not use it).

The call from the readContacts() variant that
uses a list of ids needs a bit of special
handling for that, but it's special handling
that is beneficial anyway: it's more efficient
to pass in a truncated boundIds list than to
construct the full list and then use only part of it.

This also fixes a bug where readContacts could
return QContactManager::DoesNotExistError when
actually the query just had a maxCountHint.