SERVER-14518: Allow disabling hostname validation for SSL

(cherry picked from commit 138d78bd6d3b28db332f263bd808ccb4f1ac6979)