Fix memory leaks in sms and phonebook

Fix memory leaks found in rilmodem drivers sms and phonebook.