Detect when to serve resources over SSL

We're using ACF Lite for a client which has the admin area served as HTTPS. We encountered errors as the JS and so on aren't served over HTTPS, which means Chrome blocks them as insecure content.

The attached changes check for SSL, then run a quick search and replace to change `http://` to `https://`.


P.S. I haven't checked for this issue in the main ACF code.