Requests for comment/JSON validation

Background
As we increasingly store content in JSON, usually via ContentHandler, there is a need for a standardized JSON validation system that meets the requirements of Wikimedia projects. We currently have two different solutions deployed to the Wikimedia cluster: the JsonSchema class bundled in the EventLogging extension, and the json-schema library included in MediaWiki core.

Problem
We are using multiple validators in production, neither of which is suitable for our needs. Each has something the other does not: while the EventLogging schema validator supports localizable error messages, it does not support JSON schema v4 features (test suite). The json-schema library included in core has the opposite problem. This will grow as a problem as more extensions are developed to make use of ContentHandler functionality and there is an inconsistent practice as the tradeoff is made between sophisticated schema and multilingual support.

Proposal
Based on an agreed-upon set of requirements, we should adopt a schema validator and implement it in MediaWiki core.

Requirements
These are the current proposed requirements:
 * Support for localized error messages (i18n)
 * Compliance with JSON Schema Version 4, maybe version 3 as well if there are compatibility issues
 * Direct support for validating PHP objects/arrays, so they don't need to be converted into JSON first.