add failure option
fix the race for task init
finish master failure test
fix detect exitepoch at first time
possible race in close, cleanup
Merge pull request #91 from fengjingchao/master

Simple master failover testing