Fix issue in PhoneNumberUtils.compareLoosely

There is an issue with MMS delivery report where
even if the report was received the status is shown
as pending.

If the number of matched digits is greater than or
equal to MIN_MATCH and if one of the input strings
index has reached the lower limit,
PhoneNumberUtils.compareLoosely should return true.
Currently, it doesn't return true as it is expecting
the index to be < 0 which will not happen for the
following case where country code + number is without
"+" prefix or the number is without country code-

This patch fixes the issue by checking the index <= 0.

Change-Id: Ia16723f8d2b94ddf282ab6b0ab9892d34323902d
Signed-off-by: Jeevaka Badrappan <jeevaka.badrappan@intel.com>
Signed-off-by: Arun Ravindran <arun.ravindran@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 64234
Avoid strict mode warning when persisting sync state

We need to be sure that the write of the SyncManager state is complete
when broadcast of ACTION_SHUTDOWN is complete, so doing it
asynchronously is not an alternative.

This will remove the strict mode warning.

Change-Id: I01897bcc4bc0226cc3b49d4a6361d0572614c74c