Use httphelper and cache response even when it is empty


Fixes #12164
That will fail. You need to pass an array containing the constructor parameters. But then again, I'd probably be better not to pass a real IConfig. A mocked one may be sufficient:
```php
$httpHelper = $this->getMockBuilder('\OC\HTTPHelper')
	->disableOriginalConstructor()->getMock();
```

Or if you really need it:
```php
$httpHelper = $this->getMockBuilder('\OC\HTTPHelper')
	->setConstructorArgs(\OC::$server->getConfig())
	->getMock();
```