EE: Added EachBatch for iterating tables in batches
This is the EE version of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12707, which just includes an additional "disable" statement for a case where we use in_batches
for ElasticSearch code.