The polling statistics collection used atomic_add to increment values. This
is not an optimal way to update statistical values. Moved to per thread
values which are summed up when they are read.
Moved the functions used to gather polling statistics to their own file and
created a specific data type for statistics.