Fixed IP address response

* ip_addresses vs ip_address response key
* scope of db_api calls
* added ip_address.version to response dict
* updated unit tests