BaseSchemaTree: add a SchemaKey member
Delete obsolete class
AsJson: make it extend JsonSerializable

The end goal is to get rid of AsJson completely. Start and make its `.asJson()`
method obsolete.