Improve handling of popup menus.

* Work around PopupWindow's leaking of listeners into the ViewRoot VTO
  when the anchor view is detached before the popup is dismissed.
* Apply similar changes to MenuPopupHelper. This also means that support for
  OnAttachStateChangeListener is not required for correct operation of the
  popup window anymore. OnAttachStateChangeListener is still used in case
  the popup anchor view is not attached when the popup is shown, even though
  this seems unlikely to happen in practice as positioning of the popup is
  pretty meaningless in that case. It would be possible to remove the entire
  OnAttachStateChangeListener shim as a second step.
* Included PopupMenu from AOSP. Technically it's not part of the ActionBar,
  but ABS uses popup menus internally and all the plumbing and resources are
  already in place.