Add option to set a pre-processor for a request chunk

We needed the ability to modify the request body stream (to insert authorization creds within the SOAP header).
This change allows specifying a requestMiddleware function that is executed when a chunk arrives.  It is passed the request and the chunk.