s4-ldb: Implement ldb_msg_difference() function to accept a memory context from client