Started refactoring qstat.c main() in order
to make it possbile to retry in certain cases
when requests to the server fail. TRQ-2178