iio-monitor: Move main screen handling logic into its own function
iio-monitor: Move main screen handling logic into its own function

Move the logic handling the main screen of the iio-monitor into its own
function. This will simplify future refactoring.

Signed-off-by: Lars-Peter Clausen <3318dc5ce3e4fb7c28a0b841b6801c884e1d0896@metafoo.de>

gburca/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio,gburca/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio,gburca/libiio