Cleanup the implementation of HTMLTableElement::GetCaption.