MmsCommunication refactor

Introduce MmsConnection class to handle incoming and outgoing network transactions, behaving as a simple abstraction layer over URLConnection objects.

Also another small change for general safety: in retry logic, check protocol before following links and prohibit https->http redirects.