Error collection functions added.

The API now provides functions for collecting errors found during comparing JSON against provided schema. In case an error is met, instance is skipped, while the error is reported to external handler.