use ServerBootstrap
Summary:
Use server bootstrap.
* code reuse
* Allows multiple accept threads easily.
Accept now doesn't happen in the server's eventBase, but a new thread.
I think I hit all the corner cases involving existingSocket, duplex, stopListening(), etc.
There are a lot of minor changes here to support all the cases, let me know if I should split anything to separate diffs
Test Plan: fbconfig -r thrift/lib/cpp2; fbmake runtests
Reviewed By: hans@fb.com
Subscribers: haijunz, yfeldblum, ruibalp, fbcode-common-diffs@, davejwatson, jsedgwick, trunkagent, doug, alandau, bmatheny, mshneer, folly-diffs@, mcduff, andrewcox, fugalh
FB internal diff:
D1732895
Tasks:
5788102
Signature: t1:
1732895:
1423087631:
379bbb131c35ce2221801bc7cec226f87ba0b1d9