[statistics] Do the syncing to db from within the bsc_hack

Change the counters_store_db function to be a generic for_each
function taking a function pointer and data. Use that in bsc_hack
to store it to the DB.

This is removing the DB requirement and will allow to handle
the counter values in different ways without making the counter
list public.

I verified that the syncing is still taking place.
3 files changed
tree: 7200885f3bec2262ad6bb6ce32dfea37f2c31c62
  1. hlrsync/
  2. linux-kernel/
  3. openbsc/
  4. rrlp-ephemeris/
  5. wireshark/