Store stats information into separate files
Currently the statistic information is stored into the profile file.
This results in rewriting the whole file if connann_stats_save is
called. This results in too many disk I/Os for low power devices.
Furthermore, only the current value is stored. There is no way to
find out how many bytes have been transfered in the last month.
First, each service statistic is stored into a separate files under
/var/lib/connman having a *.data extension. This file contains fixed
sized records of stats counters and will be mmap into memory. It is
used like a ring buffer.
If the buffer is full or after a certain period (e.g. a month), the
raw data will be summerized into the *.info file.
Currently the summary is not implented yet. This will be implemented
in the next round of patches.