Making it possible to POST bulks in a single-threaded way, avoiding usage of Piped streamed
inlined method in order to avoid dependency on class StreamingJsonSerializer
extracted interface LocalBulkBuffer and class DefaultLocalBulkBuffer
extracted interface BulkExecutor and class BulkOperationExecutor in order to make it easy to change implementation by configuration
extracted the StreamedCouchDbConnector way of doing bulk into a new class BulkEntityExecutor, and setting an instance of it to be the default BulkExecutor for StreamedCouchDbConnector
extracted method into new interface BulkStreamExecutor and new class DefaultBulkStreamExecutor, in order to make it easy to change it by configuration
using Generics on interface BulkExecutor and renamed classes and variables to be consistent with usage
checked generic
created class InputStreamBulkEntityBulkExecutor as an alternative to InputStreamWrapperBulkExecutor, reducing allocations of temporary objects
fixed invalid Content-Encoding that fails when used with Cloudant
improved resilience of BulkTest in order to support running on a Cloudant instance and not requiring to drop the database before each test + also reducing iterationCount to avoid costing too much on Cloudant