Add performance counters to database abstraction

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>