Sized enumerator

This PR adds a lazy size block to enumerators returned by `Batches#find_each`, `find_in_batches`, `Result#each` and `Enumerable#index_by`.

This allows, for example using my [gem `with_progress`](https://github.com/marcandre/with_progress):

    Users.where("balance > 0").find_each.with_progress do |u|
      UserMailer.send_invoice(u)
    end

This will print a progress bar with an estimated time left, etc, while still loading the records in batches.

The PR also has a couple of test cleanup commits at the beginning.

Note: In Ruby 1.9, there is no `Enumerator#size`, so the test is conditional on that. The block given to `to_enum` is ignored in 1.9, so no specific treatment is needed.