Fix app ordering for activity and gallery

 * refs owncloud/core#4324

cc @jancborchardt @karlitschek