Rewritten the RiskModel class and introduced RiskInput

This is a refactoring needed to support the simplification of the risk calculators on the engine side: