hooked up XmlPrettyPrinter with ManifestMerger

Fixed a bug I introduced in XmlPositionParser by now flushing any
pending TEXT node when encountering a COMMENT node.

Added tests to ensure pretty printer is invoked when serializing
an xml document.

Change-Id: Ib17856b7dddd6ff8a6515b153d8aa4433fe5d7b6
Add more tests to SDK Manager.

Slightly change DownloadCache and SettingsController
and provide unit tests for these.

Change-Id: Id5045f7725c870cc3c117c0269aaf080570dd7b4
Merge "Add more tests to SDK Manager." into idea133
Fix LintDriver's ClassEntry compareTo method to handle duplicate paths

Without this fix, sorting ClassEntry objects could throw a
  Comparison method violates its general contract!
error if there were duplicates on the list.

This might be the cause of
67827: Gradle Build Fails with Lint Comparison Failure
(unless there is some other scenario that the comparator is also broken
for)

Change-Id: Ic75b909040fad541f17cadbb1664569b9742ccc2
Merge "Fix LintDriver's ClassEntry compareTo method to handle duplicate paths" into idea133
Fix formatting of markup strings

If there are spaces between elements we need to preserve that.

Change-Id: I0b0a63dbc40d34aa61cb774d7167dbe660e7977c
Merge "Fix formatting of markup strings" into idea133
Prevent whitespaces in string res during merger.

Change-Id: I4a93839edf4320f1d1482b465f8fdeea96ed02aa
Merge "Prevent whitespaces in string res during merger." into idea133
Merge "hooked up XmlPrettyPrinter with ManifestMerger" into idea133
Added ability to save and reload manifest merger actions.

Split ActionRecorder which is not used to record actions during the
merging activities and Actions which is the resulting object once
merging is finished. Actions can be pesisted to an xml document
and reloaded from one.

Started provided some convenience APIs on Actions to retrieve actions
per element or attribute.

Implemented a simple ResultMapping to be able to get a pointer for
each resulting merged xml line to the original location that line
came from.

Change-Id: I8f073d34471928151cf1f12a84137390feb377ae
Merge "Added ability to save and reload manifest merger actions." into idea133
Merge remote-tracking branch 'aosp/idea133' into idea133