test_stasis.c: Misc cleanups.

* Make the consumer ao2 object use the ao2 lock instead of a redundant
lock in the struct for ast_cond_wait().

* Fixed some curly brace placements.

* Fixed use of malloc(0).  malloc(0) has variant behavior.  It is up to
the implementation to determine if it returns NULL or a valid pointer that
can be later passed to free().


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/12@408983 f38db490-d61c-443f-a65b-d21fe96a405b