CLOUDSTACK-6597: Updatevm - root admin should be allowed to change instance name

(cherry picked from commit 18c6ae07961f0cf787fe695da4b25b8d8f955acc)

Conflicts:
	api/src/com/cloud/event/EventTypes.java
CLOUDSTACK-6599: Add the column in Java upgrade path since 4.2 already has the extract template/volume columns

(cherry picked from commit be765ce8680564b743a73dd360c590c0e495c204)

Conflicts:
	engine/schema/src/com/cloud/upgrade/dao/Upgrade430to440.java
	setup/db/db/schema-430to440.sql
update vlan uris

Conflicts:
	engine/schema/src/com/cloud/upgrade/dao/Upgrade430to440.java

(cherry picked from commit 44012ddadfd73e76b3750e7ce1e6b4aa24d74796)
(cherry picked from commit 0329bebac5aa7dd68d7d9350d3a2cc609ce5e4a9)

Conflicts:
	engine/schema/src/com/cloud/upgrade/dao/Upgrade430to440.java
try-with-resource to prevent resource leaks

(cherry picked from commit 39f775c38126bb25a0418f82196caaba463f8c1c)
(cherry picked from commit fc52e641d8f69d8c0b552119203b0a2bc58e488f)

Conflicts:
	engine/schema/src/com/cloud/upgrade/dao/Upgrade430to440.java
Fixed issues reported by coverity NPEs, unwritten field access and self assignment

Signed-off-by: Koushik Das <koushik@apache.org>
(cherry picked from commit 390e498dc58a89f0b060c50e5b796061bc97342e)

Conflicts:
	engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
Fix for test_01_create_volume to use the correct volume name for KVM

Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
(cherry picked from commit 280d167316d92a8d24d0917f8945b408b87677a8)
CLOUDSTACK-6895: 1. Populate firstclass entities as uuids in the context instead of dbids for performance.
2. Add ctxDetails in the ParamGenericValidationWorker to avoid warning for api validation
3. Add some missing events.
4. Correcting mapping for ResourceObjectType.NetworkACL and ResourceObjectType.NetworkACLItem

(cherry picked from commit 8a9092c3cd4e3c034f9f4d0a7491875dc080e9dc)
imports
CLOUDSTACK-6922: Updated events for firewall ingress and egress

(cherry picked from commit 2214bd2502a34ee8e671eb6b4efe8cd26e29ac5a)
CLOUDSTACK-6923: updated listLBStickinessPolicies API to list using stickinesspolicy id

(cherry picked from commit b0d726a872e2859a56ee677c15079cc3a59ab894)

Conflicts:
	api/src/com/cloud/network/lb/LoadBalancingRulesService.java
	api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLBStickinessPoliciesCmd.java
CLOUDSTACK-6830: Fixed [hyper-v] during VM migration, volumes on zone wide primary
store requires storage migration resulting in failure of VM migration. This also
improves the hostsformigration api. Firstly we were trying to list all hosts and
then finding suitable storage pools for all volumes and then we were checking
whether vm migration requires storage migration to that host. Now the process is
updated. We are checking for only those volumes which are not in zone wide primary
store. We are verifying by comparing volumes->poolid->clusterid to host clusterid.
If it uses local or clusterids are different then verifying whether host has
suitable storage pools for the volume of the vm to be migrated too.

(cherry picked from commit 64153a43711420224655bfbe248b4b87474a1f23)
CLOUDSTACK-6987: Add support for storing metadata for snapshot policy and controlling policy using display flag

(cherry picked from commit 5cf8edd7ec22095e70d72486a2380228fb3728af)

Conflicts:
	setup/db/db/schema-430to440.sql
Allow for length of password on VMs to be set via global settings

(cherry picked from commit 96412e3e58fd1ced9d269e4552aaa6410bedf556)

Conflicts:
	setup/db/db/schema-430to440.sql
CLOUDSTACK-7000: ListSnapshotPolicy should list by policyid. Introduce updateSnapshotPolicy command

(cherry picked from commit fce21439facea267d958d8939059ba65afb3578a)

Conflicts:
	api/src/com/cloud/event/EventTypes.java
CLOUDSTACK-7005 - Failed to start MS with latest 4.4 RPM builds

(cherry picked from commit f7417d622a15c9ff6a5d6e5e7284bd220bc647ee)

Conflicts:
	setup/db/db/schema-430to440.sql
CLOUDSTACK-7000: Fix bugs in ListSnapshotPolicy and updateSnapshotPolicy command

(cherry picked from commit 63c4f028971f80a9dfa32125a3eed71468209497)
CLOUDSTACK-7068: addIpToNicCmd changed to BaseAsyncCreate

(cherry picked from commit 252e58381aae6f321c972d00a3bb8dd7c89d97c0)

Conflicts:
	api/src/com/cloud/event/EventTypes.java
CLOUDSTACK-6358: KVM mappings for CentOS 6.x and RHEL 6.x

(cherry picked from commit c8ca15b95a57a3d79b71c76c913e295f6490f05d)

Conflicts:
	setup/db/db/schema-430to440.sql