optimise call of callback + make logic clearer

the previous logic in the modified block of code was
more like a brainfuck. I didn't find any particular
reason for it so I made it be more clear. But the initial
idea why I came around the code is that I didn't like
calling the callback after sleeping. It means that
we're making decision about looping more after wasting time
in sleep. It also means that standby holds a lock longer
then it should during last iteration. I know that
it's not a big deal but it causes some inconviniences
in HADaemon::Control.