healthd: Update battery status before the mainloop

If the alarm is the first event to trigger, the charging animation won't
be seen before that when healthd working at off mode charging.

Do the periodic chores and heartbeat before the mainloop, this makes
battery status be updated immediately and charging animation shows timely
in off mode charging.

Change-Id: I48268930469069882b8e4efafa6d063f8e8e8dd2