Don't fail pending RPCs during shutdown, wait for them.
Don't fail pending RPCs during shutdown, wait for them.

The old behavior was annoying and unpredictable, especially
for short-lived programs.

Also, do a flush() during shutdown to make sure we don't
drop buffered edits on the floor.

Change-Id: Ib2c34d244b7c0d7c1c58eb65a2907e1303baf57d

hhshuai/asynchbase,OpenTSDB/asynchbase,hzy001/asynchbase,angushe/asynchbase,SteamShon/asynchbase,SteamShon/asynchbase,nvoron23/asynchbase,mway08/asynchbase,tempbottle/asynchbase,Flipboard/asynchbase,Connexity/asynchbase,StumbleUponArchive/asynchbase,mway08/asynchbase,hzy001/asynchbase,tsuna/asynchbase,manolama/asynchbase,adityakishore/asynchbase,Flipboard/asynchbase,angushe/asynchbase,tsuna/asynchbase,tempbottle/asynchbase,hhshuai/asynchbase,manolama/asynchbase,Connexity/asynchbase,manolama/asyncbigtable,adityakishore/asynchbase,yuzhu712/asynchbase,OpenTSDB/asynchbase,pythian/asynchbase,mapr/asynchbase,OpenTSDB/asyncbigtable,mapr/asynchbase,nvoron23/asynchbase,yuzhu712/asynchbase,StumbleUponArchive/asynchbase