Generate the compiled model during build

This allows to make sure that the context is using an up-to-date model, most useful for Release builds.
To avoid dependency cycles the compiled model needs to be compiled in an assembly separate from the startup assembly