Make repo decorators multi-repo multi-table aware

The API for repository decorators changed in a backwards incompatible way, while previously there was just one instance of a decorator, now there is one per repository and table, and these instances are created by RepositoryDecoratorFactory.