Add the option to include log writes as dbwrites

Log table writes are not counted as db writes,
I've added a setting, enabled by default, to count
them.
Merge pull request #27 from dmonllao/count_log_writes

Include log writes as db writes