Do not validate constraints in schema constructor

This patch moves validation of constraints out of the constructor of
schema objects into a separate method that can be invoked on the
schema objects after creation. This gives us more control over when
validation shall be invoked.

This patch fixes an issue with custom constraints that could not be
validated when having a default value, since they require the RPC
context to be present. However, the context was not present in the
places where needed.
The short-sighted fix would have been to change a lot of method
signatures to pass the context properly, but that did not seem to be
really clean. The better fix seemed to be to move validation into
a separate method that can be invoked with the proper context. This
will also give us more control on when we do validation, and which
validation we do.

This patch
Closes-Bug: #1314240

This patch will also enable to fix
Partial-Bug: #1314401

For that bug it will be necessary to switch off validation under
certain conditions, which was not possible before when doing
validation right in the constructor.

Cherry-pick from review https://review.openstack.org/#/c/91485
(cherry picked from commit 19f83e84269e1aec2d299ada616a4648e00f4333)

Conflicts:

        heat/engine/parameters.py
        heat/engine/service.py
        heat/tests/test_hot.py

Change-Id: I19e1fb520551eb42bf36bb380f1cc28c81bbaedd
Do no re-validate parameters for existing stacks

This patch disables validation of stack parameters values when
loading existing stacks from the database. The old behavior was
to always validate stack parameter values when initializing a
Stack object. However, this causes problems especially with
custom constraints when a constraint could be fulfilled during
stack creation but cannot be fulfilled at a later point (e.g.
when a flavor or keypair has been deleted). In such a case,
the existing stack became completely unusable.

This patch changes the behavior to not do parameter validation
for existing stacks. The assumption is that validation at stack
creation time should be sufficient to make sure the stack is valid,
so only valid stacks end up in the database. Therefore, validating
parameters again when loading stacks is not really required.

Closes-Bug: #1314401

Cherry-pick from review https://review.openstack.org/#/c/94329
(cherry picked from commit 349a6f04b53309f7fa8f3225f98d41670888d20c)

Conflicts:

        heat/tests/test_parser.py

Change-Id: I0947c2dcfb9db4c81b07de582aab86f262d0c008
Merge "Do not validate constraints in schema constructor" into stable/icehouse
Merge "Do no re-validate parameters for existing stacks" into stable/icehouse