intelli_plug: refactor stats calculation code to be less intrusive

this is done for those kernels which do not have 100% source code available
and must use existing closed source modules such as wifi drivers

Change-Id: I362fa8beecbc12516218e5740b8ea1846bf54532
Signed-off-by: Paul Reioux <reioux@gmail.com>