Add missing tests for db.api.instance_* methods

Add missing and fixed existing tests.

Mostly replaced assertEqual(2, len(result)) by _assertEqualListOfInstances
and some other minor nits.

blueprint db-api-tests

Change-Id: Ia81dc1d75cbceb3ab882a02a66b3d9ce292816c1
Merge "Add missing tests for db.api.instance_* methods"