Fix table renumbering

When a table is deleted, renumber tables from the topmost editable down (because editors can be nested). This was already implemented for some cases but not all. In addition, deleting a whole semantic block also renumbers tables if a table was involved.