CASC-231 HttpsURLConnectonFactory is Not Serializable

Problem: THe HttpsURLConnectionFactory is not serializable, causing problems for clients that must serialize
the principal (which depends on a ProxyRetriever).

Solution: Make the HttpsURLConnectionFactory serializable.

QA Notes: added unit test to confirm serialize-deserialize
Relevant note: IntelliJ somehow decides to reorder my imports alphabetically. Havent been able to find the setting for it to stop this. If you find one, let me know :)