Minor optimizations by using memoization

In the context of risk classical psha based workflow, a couple of method of the VulnerabilityFunction are called several times for each asset of a given taxonomy in the exposure model. As the number of vulnerability functions is small and the method does not have any other input parameter, it is safe to memoize such methods.