Builds the model according to the configured actions.
If context is not null, the model builder will additionally perform a flatten operation before applying the configured actions. The context parameters is also required if ContextualModelBuildActions are used.