Move some template validation to Template class

This patch moves some template validation code to the Template class'
validate() method which has been introduced in change
https://review.openstack.org/#/c/83758 .

Going forward, this should make it easy to perform specific
validtion in Template sub-classes (HOT, CFN).

Change-Id: Iaf86f48d462231a7aa51adb642ea8920f9f43892