[XWIKI-3544] Fix rendering cache for on-demand extensions

Rewrite of #257 with applied checkstyle and custom component support
This interface is located in the internal package but it seems you're using it in some other module (skin extension module) which means it should probably be public...