refactor utils.ParseHost with switch-case, so we can add other proto support easily
let utils.ParseHost return err when errors happen
Merge pull request #2354 from hamo/refac_parsehost

refactor utils.ParseHost with switch-case, so we can add other proto support easily