libsysutils: fix null pointer and memory leak issue

In SocketClient::quoteArg function
1. Fix potential null pointer accessing issue
2. Fix potential memory leak introduced by realloc fail

Change-Id: I1ca0f9089290d43452e9a71428244545f4ed866b
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
Merge "libsysutils: fix null pointer and memory leak issue" into jb-mr1

Change-Id: I0770f2f3e3801d6f8b5a8cafb8b5581f1b09e52f