ISPN-2250 Handle all the remaining review comments for the NBST pull request

Add checks for Thread.isInterrupted() to implement faster cancellation of OutboundTransferTask.
ISPN-2250 Unit test for OutboundTransferTask

 * Test OutboundTransferTask in isolation, using mocks.
 * Minor cleanup in related classes.
 * Process all chunks in one call
ISPN-2501 wip
optimize state transfer lock for local mode