ActionBar: Compute required items prior to optional items

When computing if a item should be shown in the action bar, required items need to be compute prior
to optional ones. Otherwise, in some cases (when the optional menu goes to the left of required
items then the algorithm could determine that optional has space to be shown and force the show of
required items, causing the required items to not be shown).
A concrete case is in the Email app. In the message_view_fragment_option.xml are defined 5 menus,
that when are all shown (xe: in Exchange mailbox account type) the bar is complete filled. But if
the overflow button is forced to be shown (the device has no permanent menu key) the overflow button
overlaps the older button, because space of 'ifRoom' items are wrong computed.

Change-Id: I6fc8e3e202d76f9704d7ec2383c7ee6f7b05ba76
Japanese: update translation.

  - Add missing translation entries.

Change-Id: I076e396c065b642d9bf342452eacea4588a5525f
Update korean translation

Change-Id: Ic6c85c8253d81079316e38a58e7e852e44be5a73
Correcting hungarian translation

Change-Id: I7f68a801dd680c4c2f4f2f528f1f0079c8cdabb7
Merge "Japanese: update translation." into cm-10.1
Merge "Update korean translation" into cm-10.1
Merge "Correcting hungarian translation" into cm-10.1
Revert "Japanese: update translation."

This breaks the build!

This reverts commit 3cad9a750319aec8dd4ec73dd89f6baf0ef566e7

Change-Id: I5449e1af55230e927d8f06a8f7bb58595d132c41
Merge "Revert "Japanese: update translation."" into cm-10.1
Revert "Revert "Japanese: update translation.""

Fixing build error introduced with original patch set.

This reverts commit e58d55180a8fb7997845ea31a7e2a4621a7faa62.

Change-Id: I623af1c083f45121f784d0a772c5c02d03240386
GlobalActions: Fix possible race condition when showing dialog.

Depending on the presence of a previous dialog, the newly generated one
gets either immediately displayed (no old dialog) or shortly delayed
(after dismissal of the existing one).
If a new show event happens (by rapid fire of the power key, for instance,
using a keyboard with fast-repeating events) during that delay, a new
dialog will be immediately displayed, and when the delayed show triggers
it'll conflict with it (and bring everything down).

This moves the creation of the new Dialog object to _before_ showing
it (delayed or not), instead of the show method itself, to ensure the
object isn't clobbered by competing/sequential calls to handleShow()

Change-Id: Ie4d9a8507ebaf59da31869c38b98c3c98a74468e
Merge "ActionBar: Compute required items prior to optional items" into cm-10.1
Merge branch 'cm-10.1' of github.com:CyanogenMod/android_frameworks_base into cm-10.1