gril: fix cancel_group/offline crash (LP: 1262340)

When the modem is set offline (for FlightMode), the
core ofono code will call remove() for the call-volume
and netreg drivers, which will result in the low-level
gril function ril_cancel_group() function being called.
This low-level function has a bug in its queue logic
which can result in commands which have already been
sent to rild being removed.  This causes problems when
a response is received, as the code asserts that the
command_queue length is >0 when an incoming response is
received.