TaskStackBuilder correctness fixes
TaskStackBuilder correctness fixes

* Don't mutate original intents when adding default flags.

* Add the relevant flags to the array returned by getIntents() such
  that it can be used directly in a call to startActivities or
  similar.

* Deep copy the component intents when building an intent array for
  getIntents()

* Clean up some internal code duplication

Change-Id: I71d3b7f30d4f7d8f1cce778d406ea0e513d382c5

xorware/android_frameworks_base,xorware/android_frameworks_base,xorware/android_frameworks_base,xorware/android_frameworks_base,xorware/android_frameworks_base,xorware/android_frameworks_base