Added missing builder.endObject calls
Retry blocking if async indexing is rejected due to queue size

Some tests use AbstractIntegrationTest#indexRandom which sometimes uses async
indexing. This can easily run into queue size based rejections on a slow
box. In that case we should retry blocked indexing.
Randomly use Bulk in AbstractIntegrationTest#indexRandom
Segments API: Support merge id on segments (groups segments being merged)
Return a merge_id element in each segment of the segments API, allowing to group segments that are being merged as part of a single merge and indicate which ones are being merged now.
closes #3904