CLOUDSTACK-4566: fix incorrect values in resource_count table for resource limitation

There are three issues in resource_count table
(1) expunge a vm, the public_ip decreases and becomes -1 in basic zone.
(2) recover a vm, the volume increase.
(3) restore a vm, the volume decrease.
Fix pep8 formatting to fix cloudstack-marvin build
(cherry picked from commit 5326833971da14df17565b61c7f15f11af6a61b5)