Make obj_to_primitive() handle netaddr types

This makes base.obj_to_primitive() handle netaddr.IPAddress() and
netaddr.IPNetwork() objects so that they properly become strings
in the primitive format, which provides compatibility with existing
network dicts.

Related to blueprint nova-network-objects

Change-Id: I098d775a2a792073b2777495d665846f399ecf3e
Merge "Make obj_to_primitive() handle netaddr types"