on_ac_power: improve reporting of AC power status in more scenarios
- If no battery is detected, do not report that the machine is offline. This fixes an issue with intel nuc devices that incorrectly report their typec ports as sink ports.
- Improve how the typec power role is determined by checking only the typec ports that are part of the UCSI device rather than checking the entire array of typec ports.
Ubuntu bug page: https://bugs.launchpad.net/ubuntu/noble/+source/powermgmt-base/+bug/1980991