update datebase class

update db by timestemp(hourly)
remove log and unused
rename and added get History funcrion
moved to api
updated debug tool
update api

added sync data procedure
onReadSleepHistoryData
onReadActivityHistoryData
update compaticable with new api function