Extract resource loading into xblock-utils