[module.json extensions] Group views by location before sorting
[module.json extensions] Group views by location before sorting

Some views define an 'order' field so that views that share a location
can be sorted in a predefined order. Because some views don't define
such field, thus, sorting the complete set of registered extensions by
'order' doesn't necessarily produce an array in which views within a
location are in order with respect to one another.

As a workaround a grouping by location is introduced before sorting
registered views in ViewManager.

Bug: 1131500
Fixed: 1170241
Change-Id: Iaf270c73e160c94fce5e0ed52e1c3f2473250990
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2643655
Commit-Queue: Andres Olivares <9d3bededfc9b98cb289557338a8f98e77d597607@chromium.org>
Reviewed-by: Tim van der Lippe <dba8716ee7f8d16236046f74d2167cb94410f6ed@chromium.org>

ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend