Fix the performance of the network mon segment

The network monitor segment now runs in its own thread so that it does
not block the main thread.