Respect CandidateGenerator#size if set in the request and reduce the total #of candidates to the shard size.

Closes #2752