Fixes #746 - Generate all the Host template when click on Build to avoid...

Generate all the Host template when click on Build to avoid errors during installation.
Includes moving of template_used to Managed model so it can be used elsewhere.

@eLobato the idea here is to show the error in the UI, so we are catching the exception here which are generic (e.g. during host validation proxy command fail of some sort), since afaik we only reach out to proxies during validations, i think its fine to rescue here and raise other proxy errors in the proxy specific section?