Simplify DatabaseBase::tableName()

- Removed isset() check for configuration setting since they are always defined
- Removed triple check whether a database is already defined by putting everything in the same place
- Simplify the construction of the result string

Change-Id: Iaaf68149f16b1d38a038db1b41909464f29e2289
Merge "Simplify DatabaseBase::tableName()"