Review Board 1.7.22

Flume-808: Source/sink.close() is not invoked by DirectDriver if is blocking.

Review Request #2523 - Created Oct. 21, 2011 and updated

Mingjie Lai
DirectDriver's lifecycle management is in one thread. It indicate that DirectDriver cannot close source/sink gracefully if the or sink.append() is blocking. Before the patch, in most of the cases, source and sink's close() relies on an interruption exception by DirectDriver.cancel(). 

The patch moved source.close() and sink.close() from the pumper thread to the main thread of DirectDriver. 

Put the patch for review. Expect to see more comments. 
TestDirectDriver passed locally. But haven't run a full tests against the trunk. I hope we can fix jenkins and make sure trunk can pass tests firstly.