Revert recent changes causing regression

Reverted commits 63d5cfc to b477fc8

This reverts commit b477fc85f7388c59c78bba5782106425924bb0f2.
Restore recent changes causing regression

This reverts commit ae7ce8e8cc7ef0ea1d749ba382d8e8900578c4bc.

The regression issue will be fixed in a subsequent commit.
Handle recursive blocks when highlighting cells

DRQS 39217949
The previous logic we added for highlighting the before and after side of cells
did not work correctly for recursive blocks inside cells.

In this change, we add two flags to the selectionGaps() context:

* shouldHighlightBeforeSide
  This is set to true for table cells, and is set to false whenever we
  encounter an unselected child and after the painting the first highlight on
  the before-side.

* isAfterSideSelected:
  This is the same as the flag that was added to inlineSelectionGaps and
  blockSelectionGaps, but now we have this also for selectionGaps, so we can
  handle recursive blocks.