Tweakify is_valid_boolstr().

This function used a few backslashes for continuation.  According to
HACKING, we prefer to not use this.  This code gets rid of them by
changing the way the checks are done.

Look at those backslashes ... sitting there at the end of the line.
It's like they're looking down on the code that precedes them, as if
they are somehow superior to the other characters.  Banish them from
this utility function!

Also add a unit test for this code.

Part of greenprint bored-on-an-airplane.

Change-Id: If88b6e63ab078916ce1b9cf2f5e99623c402996c
Reimplement is_valid_ipv4().

This patch reimplements the is_valid_ipv4() function is nova.utils.
Instead of open-coding the validity check, just make use of the netaddr
module, which is already used elsewhere in nova.utils.

Also add a unit test for this code.

Part of indigoprint bored-on-an-airplane.

Change-Id: Ia89cbbd94a0ac4631d794d658b53c244237e1ca2
Merge "Tweakify is_valid_boolstr()."
Merge "Reimplement is_valid_ipv4()."
Merge remote-tracking branch 'citrix/master' into build-temp