Partial copy of https://github.com/onoi/shared-resources,
made so that we can load resources in SMW in a manner compatible with MW 39+.

See https://github.com/SemanticMediaWiki/SemanticResultFormats/issues/766
