Fail early with "Primary key not included in the custom select clause" in find_in_batches

Before this patch find_in_batches raises this error only on second iteration. So you will know about the problem only when you get the batch size threshold.
Merge pull request #9969 from divineforest/fix-find-in-batches

Fail early with "Primary key not included in the custom select clause" i...