Introduced customizeConnection callbacks for URLConnection used by exists() / contentLength() / lastModified()

Issue: SPR-11320