Merge branch 'dev', remote-tracking branch 'upstream/dev' into dev
re-arrange the initial function code  and use the try-section for db
connection.
Naming the hourly table of the format  hourly%Y_%m_%d for everyday
Because the hourly tables is named as hourly%Y_%m_%d, modify the
statistic query handlers.
Add enable config for DB
Fix the dbname bug.
Add new module dbcollection, which periodically translate the hourly->daily
Add interval parm for dbcollections
Add  dailyToWeekly, weeklyToMonthly, monthlyToAnnually
Merge pull request #26 from hwchiu/core-issue#3

Finish statistic features in core