Sort enums to ensure that we get consistent ordering
Merge pull request #1 from bradh/sortenum

Sort enums to ensure that we get consistent ordering
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.