Sort libraries randomly in case there is no query

Note that the random sort is figured out on app init. This means if you
enter a query and then erase it, you will get the same result. The
initial results are always random.