Fuse: Avoid crashing due to the changes to thread handling.
Fixed 4bpl indexed mode with transparency
MIME: getencoded() should probably never return a StringRange.

(cherry picked from commit 87b47190e06ff9b0f253c1db0350e135f2595a71)
Add class Standards.JSON.Validator which can be used to validate json with a schema

The Standards.JSON.Validator class does not yet implement the full set of
schema validations. It does not yet handle dependencies nor references.
The regular expressions (for pattern properties) are limited to those that
can be handled by Regexp.SimpleRegexp.

To use the validator, load and decode a JSON schema and create a validator:

    mixed schema = Standards.JSON.decode(schema_string);
    Standards.JSON.Validator validator = Standards.JSON.Validator(schema);

Then load and decode some JSON data and pass it to the function
Standards.JSON.Validator->validate():

    mixed json_data = Standards.JSON.decode(data_string);
    if (string error = validator->validate(json_data))
        werror("Error: %s\n", error);
    else
        write("JSON matches the schema\n");

For more information of JSON schema look at
- http://json-schema.org/documentation.html "The home of JSON Schema"