REVIEW: [NXCM-5316] Add utility method for determining http/https proxy settings based on an URL

This eliminates code duplication and eventual errors in selection algorithm

Signed-off-by: Alin Dreghiciu <adreghiciu@gmail.com>