Initial validation of functions

All template functions contain only 'result' function for resolving
snippet of template. Current patch presents initial implementation of
validate method and support function 'validate' similar to 'resolve'.

Related-Bug: #1273490
Change-Id: Id81493bd72e75da746101c4c741eaf846abd8360
Validation functions for resources and outputs

This patch add ability to validate values in outputs section and also
validate properties in resource snippets.

Related-Bug: #1273490
Change-Id: I9ccb880954751555709bd92f2412cf5606969e70
Fix incorrect logic during updating in unittest

The property image_update_policy has two ways for initialization during
update. One of them is when image_update_policy is not presented in
prop_diff and shoud be used from self.properties. So image_update_policy
should be used in old and new templates without any changes.

Related-Bug: #1298850
Change-Id: Ie9afa65ad6d095d4293be077536fb807919de789
Merge "Initial validation of functions"
Merge "Validation functions for resources and outputs"
Merge "Fix incorrect logic during updating in unittest"