Schema Optimisation

Some performance improvements for the schema class.  

A couple of things have been done here to make this module a little quicker, most of which have a more detailed comment in the code.  These changes give a ~50% improvement in schema validation.