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 #5035
I think you should also check if we called it though?