Vector: Fix conflicts of "Actions" dropdown with collapsibleTabs
Follow-up to I09c8031c.
* Don't override the width of the "Actions" dropdown when collapsing
tabs. The width was hardcoded to 24px, using the actual width now.
This only matters when the "Actions" dropdown disappears completely
(it has no items inside), and then something gets moved inside it
causing it to reappear.
* Use the same collapsing speed for the dropdown and the tabs.
* Account for the width of the "Actions" dropdown if the expansion
would hide it. This issue was there before, but was not that
noticeable because the width of the dropdown was negligible.
(This required making the calculateTabDistance() function in
collapsibleTabs part of the public API.)
* Do not collapse if the width of the dropdown would exceed the width
of the tab we're collapsing. This issue was there before as well,
but in practice the dropdown was always smaller; this is not
necessarily the case now, for example in Lithuanian (lt).
Bug: 44591
Change-Id: Id4548ea388fd9f4341dd78bb132c716feb14b137