Fix Extra Table Row From Images and Charts

When there are no images or charts outside the normal rendering area the table and chart code still tries to add rows but they are empty. This leaves weird empty cells at the end of the table.

Also, when there are charts or images added after the content, the </tbody> would be outside have already closed. Browsers would parse this fine but its incorrect.