Cast `size` to int before comparison

`_get_and_check_image_metadata` pulls `size` from the image, which
comes in as string, but fails to convert it to an integer before
comparing with the flavor's `root_gb` size. This patch adds the cast
along with some test coverage for this method.

Fixes bug 1180159

Change-Id: I92bc9d6a808e49173d806e434cb145c751c8314a
Remove locals() from messages in virt/disk/api.py

No functional changes, just removing something which annoyed me
when I read the code.

Change-Id: Ia2d232d6ee2e61d3785b57798391474b8e99dee1
Merge "Remove locals() from messages in virt/disk/api.py"
Fix flake8 errors in anticipation of flake8.

Change-Id: I7c713f95eb974d5998d2be50722df7d6f64a234e
Switch to flake8+hacking.

Remove a bunch of local custom scripts. Replace with configurable
external tools.
Use local hacking checks for nova specifics.

Change-Id: I75a01375ba0ec36d2ff05abc47abe0a3f225eda5
Remove usage of locals() for formatting from nova.api.*

Using of locals() for formatting string is a nasty thing because:
1) It is not so clear as using explicit dicts
2) It could produce hidden errors during refactoring
3) Changing name of variable causes change in message
4) Creating a lot of unused variables

fixes bug 1171936
Change-Id: I293d7ebb875f65cce322d4938d1ae323f3aded8d
Merge "Fix flake8 errors in anticipation of flake8."
Merge "Switch to flake8+hacking."
Merge "Remove usage of locals() for formatting from nova.api.*"