Tested for failing to allocate mac on deallocated

* Also, added boolean consistency in ipam.py query.