Clenaup test 5

These patches clean up test code that uses a database.
Previously a test DB is created, deleted and used in various places including helper functions whose code is not seen at a glance. This fact degrades readability very much.

So the guild line to write test with test DB has been decided as in DBTablesTest.h. And I fixed test according to it. Basically, setupTestDB() that deletes and creates a test DB is allowed to be called once only in cut_setup(). So developpers don't be worried that the database is destroyed in the middle of the test.

In addtion, this clean up also has another purpose. It reduces the dependency of actual database such SQLite3 and MySQL. For example, the previous code assumes that DBTablesMonitoring is stored in SQLite3 and uses defineDBPath() that needs SQLite3. These fixes also reduces the explicit call of that.

Note that we still have tasks that remove unused method and do more clean up. However, this pull request is already huge, so I'll do them as an another topic.