Add fallback positioning support on tooltips.

Now you can use `placement: 'right bottom left top'` instead of just
`placement: 'auto right'` to fallback through multiple options until we
find one that fits. (`auto right` still works as before.)

* Fixes #7399 (with manual specification of the fallback order).
* Fixes #7988 (that was closed and the follow-up is not obvious).
* Fixes #1833 (by allowing alternative placements @mindplay-dk).
* Fixes #13897 (also includes the fix for right-placement calculation).