CLOUDSTACK-4087: updateTemplatePermissions - derive domainId from the template owner, not from the operation caller

Conflicts:
	server/src/com/cloud/template/TemplateManagerImpl.java
CloudStack CLOUDSTACK-3307
UCS:DB: Same UCS manager can be added multiple times
fix warnings in NetworkServiceImpl: removed unused code and add cases to switches
CLOUDSTACK-2729: use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool

Signed-off-by: Edison Su <sudison@gmail.com>
CLOUDSTACK-2340: Display service state for health-checked VMs