Use httphelper and cache response even when it is empty

Fixes https://github.com/owncloud/core/issues/12164
change in behavior: in the previous implementation the empty array was simply returned but not stored