Commit
38e5e43b2881d8b85a80d9a77670100fc9e1a639
by keithSMS UX optimisation: Deliver rx'd SMS right away.
When we receive an SMS, we first store it the database
and then send a signal to the sms queue to run.
Storing the SMS first is good, as it would be lost
on program exit, however the queue logic does not
always work, for example if there are many undelivered
SMS in the database, especially if there are SMS for
destinations that are currently attached but cannot
receive the SMS. (Older phones with limited storage,
for example)
After we have stored the new SMS in the db, we then
signal the queue to run, but this is not good enough,
as decribed above, So let's specifically try to deliver
the message that was just submitted.
Also, when fetching SMS from the DB into the in-memory queue,
prioritise SMS with least number of delivery attempts
Then try to send ALL pending SMS for subscriber in
sub_ready_for_sms() callback
Change-Id: I9af51ef0d9c2e6c5acc5128efd6195df881b680c