Patch for BVS-247 - Disallow deleting Quantum network with active ports

Same order of calls is being preserved as before, however checks are now
being performed before making a call to the controller to delete.

Checks are now being performed for all resources.

Also some more refactoring of the code.