Abstract out DB operations on deploys in db.deploy

The db.deploy module contains the Deployment class with an abstract
methods. Those methods provides high levels operations on the
deployments.

Change-Id: Ibca797832ebbc96247703cdfc8b0958d10a71ddd
Implements: blueprint independent-deploy