mon: set tid on MMonCommandAck

Set the tid on the reply to match the request.  This will allow a client
to have multiple commands in flight.

Signed-off-by: Sage Weil <sage@inktank.com>
mon/MonClient: add mon command handling

Reimplement the ceph tool functionality to set a command to the monitor
and collect a response.

Signed-off-by: Sage Weil <sage@inktank.com>
mon/MonClient: assume tid 0 is the first command

If we get an ack with no tid, we have to assume it is the first (hopefully
only) command we have in flight.  Old code doesn't properly set the tid.

Signed-off-by: Sage Weil <sage@inktank.com>
ceph tool hack do not merge
osdc/Objecter: implement osd and pg commands

This is reimplementing the 'tell osd' and 'pg ...' commands in the ceph
tool in the Objecter infrastruture.  As a result we are forced to consider
all of the corner cases we have already handled for regular ops and
linger ops, so the result should be significantly more robust.

Signed-off-by: Sage Weil <sage@inktank.com>
more ceph tool hack to use objecter
First real cut at working "preparsed command" input.

1) describe commands in .h file with COMMAND(parsedesc, CMD_<XXX>) that
forms both the stringlist to send out and the local constants to use
for enums.  This relies on Python sending commands back in with the
right number based on the array position right now; might be better
to also have Python use the constants somehow.

2) expect command input back in form "field:value", where the
only required field is "opcode", which is now a number.  This is so
we can use a switch(){} to access all the commands.

3) command bodies can now use cmdmap["namedfield"] to get the
individual values, and can rely on their presence.  Names come from
the parsedesc in step 1 above.
Hack: allow json parsing to fail, fall back to old parsing
while we have a partial implementation
Signature parsing: allow "" around comma-or-space-containing vals
Clean up some comments
Add CephHelp for pg_stat (test)
add helptext, make JSON more complex to handle it

COMMAND() grows a fourth string, helptext; json now has a dict
for each opcode, with items keyed 'sig' with the descriptor array
and 'helptext' with the help text.  Perhaps the latter could grow
to a 'help' object with short and long help if needed.

Change all inclusions of MonCommands.h to reflect the new
four-param instances.