bb #6671: tweak asm register reference in tomsfastmath code for clang compatibility
Add command, json flag, extend reply functions.

- Added a JSONSESSION command.
- Added a json flag to the connection object as well as
  the fd_buf object. This is used to track if the session
  was initialized through IDSESSION or JSONSESSION.
- Extended the reply-functions to emit JSON if the json flag
  is set. Also rewrote some of the mdprintf-stuff to use these
  functions.