fix User class for privilege renamings and additions
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.
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.