[refactoring] Extract and rename project comparators from Project

Change-Id: Ia74508d9ac7583c8cb97449fa0d091ef4dba2e41
Signed-off-by: Michael Ochmann <michael.ochmann@sap.com>
New project comparator ByUUIDComparator

Change-Id: I36eeddf5c9541724e2a43ef5da608614d45c71c7
Signed-off-by: Michael Ochmann <michael.ochmann@sap.com>
[refactoring] remove obsolete Subprojects#setProjects() method

Change-Id: I2758e9459b63dff20c46838ad3a92b120ba60181
Signed-off-by: Michael Ochmann <michael.ochmann@sap.com>
Support for "orderBy" query parameter for /api/projects

The supported sort orders are defined in the enum SortOrder.
Currently supported values for the query parameter are "uuid",
"projectId" and "name" (all case-insenitive). Any other value,
or if the parameter is no given at all, no sorting should be
applied to the result of a Lucene query (or any other set of
projects).

The parameter is ignored when also a "query" parameter is
specified. In that case the sort order is determined by
Lucene. Otherwise the default sort order is undefined as
was before this patch.

Change-Id: I20f7b21345d6f0143ccbaea997114cf786561ee6
Signed-off-by: Michael Ochmann <michael.ochmann@sap.com>
Ensure stability of RestAPISmokeTest

The sort order of the /api/projects response was dependent on the
internal project cache, which uses hash maps. Now an "orderBy"
query parameter is applied to ensure a stable order of projects
in the response.

Change-Id: I6e01091e729bbacf151ac42a50183be183ed35d6
Signed-off-by: Michael Ochmann <michael.ochmann@sap.com>