This PR groups all built-in network flags together and list them in the command as a whole. And all database path flags(datadir, ancient) are also grouped, since usually these two are used together.
This also contains some changes to the protocol handler to make the tests pass.