Clean up shutdown process
Only MapPort if USE_UPNP defined