Refactored the conversion library

The goal is to make easier the job for the desktop tools. In particular the conversion library instantiates risklib objects (VulnerabilityFunction and FragilityFunction) so that the GUI can show the error if the user tries to save an invalid model.

NOTICE: this part will be moved to oq-commons