Fix dependency sorting in CoordinatorLayout

For our purposes we need every view to be compared against
each other when sorting. Collections.sort() is stable and
efficient, and thus doesn't guarantee that, therefore we now
need to use a selection sort which does guarantee that.

It is less efficient, but it is much better than removing
all of the sorting and doing a O(N^2) loop in every draw.

BUG: 24126029
Change-Id: Ida34244d62b9c7519b4cded3ab23bef95a01f1f0
1 file changed