Adjust toolbar/action bar title handling

Treat activity title changes as window title changes when propagating
to action bars. This gives it lower priority if a "hard" title has
been set. Fix some lifecycle handling around this that previously
resulted in multiple calls.

Automatically detect the starting display options for a
ToolbarWidgetWrapper if we're not grabbing them from styles. This
prevents setTitle and friends from going totally out to lunch if
constructed around a Toolbar with no starting title.

Bug 17138048

Change-Id: I9f58a3d222546745c8aa873e996b8f0d52a0ad21
diff --git a/core/java/com/android/internal/app/WindowDecorActionBar.java b/core/java/com/android/internal/app/WindowDecorActionBar.java
index b58e1db..a8f7bb3 100644
--- a/core/java/com/android/internal/app/WindowDecorActionBar.java
+++ b/core/java/com/android/internal/app/WindowDecorActionBar.java
@@ -431,6 +431,11 @@
         mDecorToolbar.setTitle(title);
     }
 
+    @Override
+    public void setWindowTitle(CharSequence title) {
+        mDecorToolbar.setWindowTitle(title);
+    }
+
     public void setSubtitle(CharSequence subtitle) {
         mDecorToolbar.setSubtitle(subtitle);
     }