Add API to flush entries from AgentDBTable
Add ordered shutdown for all test cases
Fix unit test inconsistencies

Change-Id: I8599de5e6c7ebb38c7654221a54cbfbbf19f956a