Implemented algorithm to calculate %CPU in threads

Until now the charts and table for the CPU and Thread showed the dry cpu_ms statistics.

Now both show the correct CPU usage, as done in the top.py script in the main OSv repository.