Add new unit tests to ensure that the return values of interfaces implemented in JS don't leak memory.