Pass and use the environment in validate_template

Use the environment passed in validate_template to be able to validate
template using custom resources.

Change-Id: I85e23f26f5abbafe50073c3ac023933316af05ac
Closes-Bug: #1298450
Add handle_update to VolumeAttachment

Updates for volume attachments were handled in UpdateReplace manner,
which fails when in need to attach new volume to the same mount
(or attach the same volume to different mount on the same server,
or attaching the same volume to different server).

This patch makes all properties of VolumeAttachment
to be update_allowed, adds necessary handle_update logic
and fixes VolumeDetachTask to reliably detach old volume
so that new one can be immediately attached.

Closes-Bug: #1269686
Closes-Bug: #1251439
Change-Id: I0aee64036bf8125f76e7f427716412a326ff5eef
Ensure outputs are resolved for adopted stacks

The resolution of outputs is only performed for stacks in certain
states, so we need to add ADOPT to the valid list of actions,
as after a stack is ADOPT COMPLETE, it should be possible to resolve
the outputs in the same way as after create.

Change-Id: Iec7c9fe7cf48d7c87a5466b351ff04328d567e60
Closes-Bug: #1299173
Cherry pick oslo rpc HA fixes

Get 2 commits from oslo-rpc fixing HA failover:

* Ia148baa6e1ec632789ac3621c85173c2c16f3918 (fixed HA failover, Qpid
 part)
* I67923cb024bbd143edc8edccf35b9b400df31eb3 (fixed HA failover, RabbitMQ
 part)

Change-Id: I45f679f3da720a0c28fb552d9f4cfb3d8bd21c20
Closes-Bug: #1261631
Updated from global requirements

Change-Id: I3ad3df48d9ed9223affc81174940448bdad25995
Merge "Cherry pick oslo rpc HA fixes"
Merge "Pass and use the environment in validate_template"
Merge "Ensure outputs are resolved for adopted stacks"
Merge "Add handle_update to VolumeAttachment"