Send id fields when serializing collection UDFs

This allows the backend to determine if a row is new or already present,
and prevents it from generating spurious audit logs for unchanged rows
which are already present.

Fixes #1327