Move temporary test files into tests/tmp

Add a new folder tests/tmp and move all temporary test artefacts like
sqlite dbs into the folder. This has a number of advantages:

- clean up .gitignore and tests folder.
- common/sql/util.py files didn't really belong in common as they were
  test only.
- by doing ``sudo mount -t tmpfs -o size=16M tmpfs tests/tmp; sudo chown
  $USER: tests/tmp`` tests speed up about 3x (ext4; credit ayoung's blog).

Change-Id: I9b02a5273dd27db963e9a26085b7456f4c5f6a41
Merge "Move temporary test files into tests/tmp"