Add more diagnostics to help track down index corruption bug

This adds toString methods for a value class that appears in the
error message for this cache corruption bug:
76569: Index query code crashes with "Expected only one value per-inputId"

Knowing more about the kinds of resource entries that are involved
might help us ask follow-up questions to figure out what kinds of
data can trigger this.

Also optimize the code which recreates a set with a known size: don't
use the HashSet contructor with a fixed size, since due to the default load
factor adding that number of elements will cause a map resize. Similarly,
size the identifier StringBuilder capacity before building it.

Change-Id: Ic6cdf65d5a998ae144752e162113dfeb8c64644b
Merge "Add more diagnostics to help track down index corruption bug" into studio-1.0-dev
Hyperlinks support at the build output

https://code.google.com/p/android/issues/detail?id=75901

The general idea was to combine two existing functionalities:
* show single line of text on multiple visual lines if available UI width
  is not enough (backed by MultilineTreeCellRenderer)
* correctly represent hyperlinks with an ability to configure custom
  click handlers at the IDE UI

IntelliJ code analysis showed that the later facility is supported by
SimpleColoredComponentClass and ColoredTreeCellRenderer. They are used
e.g. in 'Git Log' and 'File History' panels. So, what we did initially was enhanced
SimpleColoredComponent which knew how to display text on multiple lines if
necessary. Corresponding patch was offered to JetBrains -
http://youtrack.jetbrains.com/issue/IDEA-130051. However, they can apply
it not earlier than in two weeks because of their release cycle, that's why we
copy-pasted target classes into android plugin and enhanced them with the required
'wrap mode' facility. We're planning to switch to the platform code later when
JetBrains apply the patch.

Change-Id: Ie656235353493b71c085d8bc670b29224631924c
(cherry picked from commit 099f88a64197b0976ac9a9a5c842b10f558f1f97)
Merge "Hyperlinks support at the build output" into studio-1.0-dev
[UI Testing] Removed unnecessary call to "requireEditorNotification" in GradleSyncTest.

This call makes the test fail because there is no editor opened. In my case
the test was passing because the original project kept it's .idea folder
(this is before we made UI tests make copies of project before
opening/importing.)

Change-Id: I7bb2fb7a8ef3fb5111a2361edf44362fe40741e3
Merge "[UI Testing] Removed unnecessary call to "requireEditorNotification" in GradleSyncTest." into studio-1.0-dev
SDK merging from SDK switch dialog on project sync

When Android Studio notices a mismatch between the project SDK and
its main SDK during project sync, it currently displays a dialog
asking the user which one to switch everything to. This CL extends
that by examining both SDKs, and if the chosen SDK is missing
packages extant in the other one (or its versions are out-of-date),
it puts up a dialog offering to copy the bits over into the chosen
SDK. It does this copy via a cancelable background task.

Change-Id: I6cabe9e0759abe0b7369f6d9a7062fe80a1c1b85
Merge "SDK merging from SDK switch dialog on project sync" into studio-1.0-dev