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