QueryBuilder forces refresh() if select() was used

Fixes #895

I have tried detecting that document managed by UoW contains less data than just fetched ``$data`` in ``UnitOfWork::getOrCreateDocument`` but it was ~0.4s slower (for whole test suite) so imo it's no way to go.