Refactored schemas compilation

- modified internals of schema compilation
- reworked $ref keyword
- support for array referencing
- updated unittests

[FIXED #80451040]