add OPT_VERIFY_KEY, OPT_SORT_HOSTS, resetServerList()

Fixes #3615, #3616, #3617. A superset of #3827.

Thanks to @keyurdg and @adsr for helping me out!