MB-11305 Fix memory leak in testapp

As identified by Clang static analyzer; fix memory leak in the
memcached testapp.

Change-Id: I1738288aa648b6b680dd205446dea6badc80b863
Reviewed-on: http://review.couchbase.org/37962
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>