Adds missing db registry api tests for Tasks

The db registry api supports calls to Glance tasks. This patch
adds test coverage to that part of the code.

Fixes bug 1364570

Change-Id: Id7a74239a54d9001c7ac4ab4c8e2b67ac0686125
Merge "Adds missing db registry api tests for Tasks"