Use helper from database cookbook to get database IP address

This way we're ready for when HA will be used for database.
Merge pull request #196 from vuntz/db-ha

Use helper from database cookbook to get database IP address