Sync filetuils from oslo-incubator

to support https://review.openstack.org/#/c/33409/

* nova/openstack/common/fileutils.py: Auto sync from oslo.
* nova/tests/virt/libvirt/test_libvirt.py (fake_rm_on_errror):
Adjust to match the new signature of delete_if_exists()
and handle mocking out the remove parameter to
remove_path_on_error() which is initialized at load time.

Change-Id: I756f1226853366e8f418d21309b0e8dcf8a24aa2
Fix inconsistent usages for network resources

If a normal user created a fixed_ip/floating_ip, a usage record with
column `in_use=1` will be created in the quota_usages table, and if an
admin user deleted the resource, a new record with column `in_use=-1`
will be created..This will cause the quota for the resources not
released.

Fixes bug 1220727

Change-Id: I705f2f9ef327a3198da6a47df772c3a1a28e1b4e
Merge "Sync filetuils from oslo-incubator"
Merge "Fix inconsistent usages for network resources"