Refactoring: move most of the code in the Tracevisor class

Only the flask code remains directly in the "main".

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>