Fix destroy request race
This is an alternative to !7. I have not tested if it actually fixes the issue.
I didn't like the implicit destroy and the ignoring of the subsequent explicit destroy added in that patch, so I tried the alternative solution mentioned in that thread: adding marshalling functions that destroy the proxy at the same time.
The patch is larger and adds some duplicated code, but it has none of the possible backward-compatibility hazards.