First work on sorting support for item listing
move most of sorting logic to separate file
support user sorting

Allowed sorting fields so far are 'name' and 'joined'.
fix regression: include rating if it is used for sorting
fix sorting according to rating

Use the same complicate SQL query for sorting as for filtering.
Move it to a constant definition.
export XML schemas with correct mime type
fix rating: must use average, not sum
Merge branch 'master' into sorting
move common sorting code to new SortHelper class
fix item retrieval for unpublished stdlib releases

Do not use the latest published, but the previous published release
as base release. Technically, this should always be the same as un-
published releases < latest published are deleted on cleanup. But it
enables us to make Stdlib::GetItemsUnpublished() private and reduce
code size
return NULL from StdlibRelease::getVersion()

This has more semantic meaning than the previous FALSE. But
more importantly, add NULL checks wherever this function is
used to prevent errors before the first release is published.
implement sorting for suspension list

Allow sorting by "created" and "expires". As the list is retrieved
by the Suspension class and not in users/suspensions/list directly,
this implementation slightly differs from the previous ones.
fix for suspension creation: cannot convert date string to integer
additional error check for suspension creation: ensure row is inserted
fix item list version sorting to obey semver

As MySQL does not allow custom comparison functions, this is a
little complicated:

- Add 3 stored MySQL functions / procedures that collect all compare
  and sort the required semver data.
- Then add a method to SortHelper that collects the necessary data
  beforehand and stores it in a temporary MySQL table.
- Last, fix items/list.php to allow multiple table joins and use one
  to sort by version.
one more fix for getVersion() returning NULL (d5898054ba)

Add a missing check in StdlibRelease::cleanup() which led to
a semver exception.
Merge branch 'master' into sorting

Merge recent stdlib fixes to allow implementation of sort support for stdlib.
item list sorting: remove literal DB table name
Fix SortHelper for columns with different names

MySQLs 'CREATE TABLE ... SELECT' uses the source column names in
the destination table. To make the column names of the temporary
table independent from the source, use 'AS' to change the name.
add sorting support for stdlib release listing

Just as with suspension sorting, the logic is split between
stdlib/releases/list and the StdlibRelease class. Also take
semver into account when sorting by release version.