Fixed a coverity reported concurrency issue

Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
CLOUDSTACK-7240: Fixed expunge VM issue in test_persistent_networks.py

Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
CLOUDSTACK-2694: Able to configure duplicate firewall rule with protocol and no ports

Signed-off-by: Jayapal <jayapal@apache.org>