For some reason, during system the main loop exits before we call
g_main_loop_quit(), so don't rely on it and use a simple polling loop to
check for modem poweroff.
`Developer edition` phones have a different compatible string but should
be considered identical to BraveHeart edition here. Therefore BH is the
default phone, unless the compatible is that of a CE phone.
When powering off the modem, we must assert the RESET line only when the
modem has shut down (otherwise it'll cause a hard reset and won't allow
the modem to shut down properly).
This commit also polls the STATUS pin during poweroff and quits
immediately once this pin goes high.
RI won't be accessible due to it being used by the kernel as an
interrupt source, so we can check the STATUS pin (CE only) which will
allow us to know precisely when the modem is shut down.