HTML reader:  Fix performance issue with malformed HTML tables.

We let a `</table>` tag close an open `<tr>` or `<td>`.
Closes #1167.