Problem: zproto_codec selftest doesn't free the object
Solution: free the object at the end of the selftest
Merge pull request #149 from jemc/master

Problem: zproto_codec selftest doesn't free the object
Problem: C codec doesn't account for case where string field is set to its current value

e.g.
    mymsg_set_mystring (mymsg_mystring (mymsg));

This causes the valgrind error "Source and destination overlap in strncpy".
It is also extra work because no copy is necessary.

Although this seems silly, it may come up in in some cases where, for example,
the processing of a request and forming of a reply is separated by several layers
of logic that make tracking whether the field has changed between request and
reply more trouble than just setting it again.

Solution: Don't perform the copy if the (const char*) pointer value is identical.

Incidental: Add assert guards for when the pointer is NULL.
Merge pull request #150 from jemc/master

Problem: C codec doesn't account for case where string field is set to its current value
Problem: cannot generate from within CLASS src directory

Solution: use topdir argument to provide optional root for all
code generation, otherwise use current directory.
Problem: cannot deal with zero-sized msg on input

Solution: do not complain if msg is zero-sized; return empty
msg as one would expect.

Also, fixed memory leak in self test.
Problem: leaking memory on longstr field

Solution: free properly before re-allocating on message recv.