Make the functional tests cleanup after themselves

The tests can fail or pass the first time, but fail in repeated
runs as the same db is used and the get_all test assume an empty
table. So start off with trying to cleanup.

Change-Id: I97937d9b33edc760dc7f3c6d4eb9e2f678506bbc
Merge "Make the functional tests cleanup after themselves"