Java API: Make sure afterBulk is always called in BulkProcessor

Java API: Make sure afterBulk is always called in BulkProcessor.

Also strenghtened BulkProcessorTests by adding randomizations to existing tests and new tests for concurrent request.

Closes #5038
maybe rename those methods to assert* as this is what they do... same with the next one