Fix a crash on upower version change

Also put more trace/dbg messages in place so it's easy to track
these issues when upower breaks itself again in the future.