ceph: handle old OSDs as command destinations, fix status part of -w

For osd tell or pg <pgid> commands, the CLI sends the command directly
to the OSD; if the OSDs are still old, the command needs to be sent
in 'plain' (non-JSON) form.  Also, the 'ceph status' from -w needs to
handle failure/fallback-to-old-command.

Refactor the guts of json_command() into send_command(), and call it
from json_command() and where needed for old-style commands.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
ceph: old daemons output to outs and outbuf, combine

When talking to old daemons, if a command succeeds, there may be
output on outs, outbuf, or both; combine them if there's no error,
and clear outs so it's not treated as stderr fodder.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>