Metamodeling on fly

Temporary pullrequest based on https://github.com/qreal/qreal/pull/728, to make reviewing easier.