cli: Fix, refactor top.lua

* Remove unused code: is_idle and table header
* Remove unneeded conversions: Time to millis
* Refactored for readability: Table keys and multiple variable assigments

Reported-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>