Automatically align popup toolgroups

Changes:
* Check if popup toolgroup is being clipped when made active, and if it
  is, use opposite alignment
* Use margin instead of left/right to compensate for border, allowing
  the theme to be more separated from the base functionality

Bonus:

ClippableElement.js
* The toggleClipping method had an undocumented and unneeded async
  behavior for calling clip the first time after toggling clipping
** This has been removed and calling code has been verified to not be
   affected
** A comment has been added to inform callers that the element needs to
   be attached and visible before toggling clipping, which is supposedly
   what the setTimeout was in aid of, but no longer seems to be needed
   for
* Remove size and overflow properties from clippable elements when not
  clipping
* Add isClippedHorizontally and isClippedVertically methods

Change-Id: I607426423026df90a86a390c8f07cf419790ba0b
Merge "Automatically align popup toolgroups"