* Revert "Add RequireFeaturesAsync() that works regardless order of app init"
* Add mutex to injection resolution
- Turns out we already support async DI resolution regardless of feature ordering
Previous code contain a race condition causing some resolution is lost
- Note that the new mutex cover s.pendingResolutions and s.features
but must not cover callbackResolution() due to deadlock
- Refactor some method names and simplify code
* Add OptionalFeatures injection
For example OptionalFeatures() is useful for fakedns module
* Fix some tests to PickPort correctly
* Add retry logic for two socks tests
Two socks tests listen for both TCP and UDP with same port number, in some cases the port is not available
Add retry logic for server core, start server core and client core separately
Extract a common method
* Add retry logic for two dokodemo tests
Two dokodemo tests listen for 5 ports, in some cases they are not available
Add retry logic for client core, start server and client separately