For #1907: output mediatype and parse HTML
For #1907: output row/col information

- side-effect: fr:grid supports nested xf:var/xf:group in editable/repeat cases
- refactor fr:grid a bit