[RILMODEM] hardening phonebook driver implementation

Length and null pointer checking in phonebook driver handler methods to prevent ofono from crashing in e.g. when sim driver calls callback with valid error.

Signed-off-by: Jarko Poutiainen <Jarko.Poutiainen@oss.tieto.com>