Unit test IPAM DB operation

Add a unit test to check that the IPAM logic is correct and
that the data stored in the DB are sane.
This test will be moved to the functional test folder once
https://review.openstack.org/#/c/126175 is merged

Change-Id: I7776a50824184663abd37e210d08a63eb5519cea