mi_json: simplify datasets

Also rewrote the string handling code.
Modified httpd to support `application/json` for our purposes.