Fix memory leak in wshc

wshc would allocate new wsh_cmd_res_t objects for every host.
Unfortunately, these were never freed. Now free them.

In error cases, free the entire object rather than just the top-level
object.