agent: Don't crash when no agent was registered on exit
If the user never registered an agent, agent_sender and agent_path
are NULL. D-Bus does not handle this gracefully, instead it kills
ConnMan. So let's skip the D-Bus part in this case.
connmand[4271]: src/agent.c:connman_agent_driver_unregister() Sending release to (null) path (null) iface net.connman.Agent
process 4271: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file dbus-message.c line 1198.
This is normally a bug in some application using the D-Bus library.
D-Bus not built with -rdynamic so unable to print a backtrace
connmand[4271]: Aborting (signal 6) [./src/connmand]
connmand[4271]: ++++++++ backtrace ++++++++
connmand[4271]: #0 0x3a9920f500 in /lib64/libpthread.so.0
connmand[4271]: #1 0x3a98e36285 in /lib64/libc.so.6
connmand[4271]: #2 0x3a98e37b9b in /lib64/libc.so.6
connmand[4271]: #3 0x3c7602fff5 in /lib64/libdbus-1.so.3
connmand[4271]: #4 0x3c76026fc1 in /lib64/libdbus-1.so.3
connmand[4271]: #5 0x3c76018aea in /lib64/libdbus-1.so.3
connmand[4271]: #6 0x45b8b1 in connman_agent_driver_unregister() at src/agent.c:426
connmand[4271]: #7 0x457b7c in __connman_service_cleanup() at src/service.c:6756
connmand[4271]: #8 0x43f54f in main() at src/main.c:702
connmand[4271]: #9 0x3a98e2169d in /lib64/libc.so.6
connmand[4271]: +++++++++++++++++++++++++++