This fixes the issue by moving the table captions to the principal child
list. It also paves the way to fix bug 144517, but it doesn't fix it as
that requires extra layout changes to nsTableWrapper frame (mostly to
reserve the multiple caption block sizes).
Test courtesy of Masayuki in D246407 (with minor tweaks).
Differential Revision: https://phabricator.services.mozilla.com/D246468