HFP: Reset max index if greater than number of Phone Book entries

Use case:
1. Pair and connect to car kit supporting Phone book download
   using AT commands eg Skoda Octavia 1.6.
2. Sync call history from car kit UI.

Failure:
Some times, phone just sends OK to AT+CPBR command though
there are entries in the call history.

Root cause:
When car kit requests for more number of entries than actually
present in the phone, we just send OK and don't send any results.

Fix:
When max index in AT+CPBR command is greater than number of entries
in phone book, reset the max index to the number of entries and send
available entries.

Bug: 66358394
Change-Id: I5c106b67d2696108f165c37d543c84fad724852c
1 file changed