Rework/split hbal's main function
Rework/split hbal's main function

This is just moving code around. A subsequent patch will do a bit more
cleanup and changing the output.

Signed-off-by: Iustin Pop <acf83a5274f31a43af6b914614365999469c1a31@google.com>
Reviewed-by: Agata Murawska <4c8886dbe342c6966e25105100cfee09458faa93@google.com>

andir/ganeti,andir/ganeti,grnet/snf-ganeti,apyrgio/ganeti,mbakke/ganeti,ganeti/ganeti,apyrgio/ganeti,apyrgio/snf-ganeti,dimara/ganeti,grnet/snf-ganeti,yiannist/ganeti,onponomarev/ganeti,ganeti/ganeti,dimara/ganeti,andir/ganeti,leshchevds/ganeti,onponomarev/ganeti,leshchevds/ganeti,ganeti-github-testing/ganeti-test-1,ganeti-github-testing/ganeti-test-1,mbakke/ganeti,leshchevds/ganeti,yiannist/ganeti,bitemyapp/ganeti,bitemyapp/ganeti,apyrgio/snf-ganeti,ganeti/ganeti,yiannist/ganeti,mbakke/ganeti