Subscribe to the ArticlePurge hook to wipe the cached constraint check results for that entity.
Patch-For-Review (includes two minor not-really-related refactorings which the later commits are based on):
- unrelated refactoring 1
- unrelated refactoring 2
- [ResultsCache refactoring](https://gerrit.wikimedia.org/r/399850)
- [ArticlePurge hook](https://gerrit.wikimedia.org/r/399851)