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.