MCO-363 add support for structured facts

With this commit series we add the building blocks to support filtering based on structured facts.