Added ORDER BY to enforce share entry order

Sometimes MySQL decides to return the shares in the wrong order, but
some parts of the code seem to require the order to be known, at least
so that the parent shares come before the children shares.

This fix adds an ORDER BY clause to force the order by id.
Merge pull request #8985 from owncloud/share-grouporderfix

Added ORDER BY to enforce share entry order