Use container instead of parent for tooltip/popover auto-placement calcs

Fixes #14561. Big thanks to @wickstargazer.

[skip validator]
Merge pull request #14623 from twbs/fix-14561

Use container instead of parent for tooltip/popover auto-placement calcs