upnp: Fix a possible buffer overflow
Correctly delete service when UPNP service disappears

Fixes #1845