HDFS-7217. Better batching of IBRs. Contributed by Kihwal Lee.
(cherry picked from commit db71bb54bcc75b71c5841b25ceb03fb0218c6d4f)