Add tests for the DB state manager

This patch also defines a testcase base class which handles the database
connection setup.

Fix the format() calls for python 2.6.

Add eventlet requirement.

Change-Id: Id110aa817a680cc02c882ea24f275eb127a738a8
Merge "Add tests for the DB state manager"