Adds ability to update a domain in DB API

Allow a domain to be updated, including checks on transferring
ownership from one user to another.