Fix some memory leaks.

Mostly the issue was missing call to talloc_free() in the test code. Swapped to the cleanup macro everywhere.

One issue that was more complex was push / pull zero-length strings, which required some special case handling. That part (lib/mapirops.c) needs review.