GameLibraryModel: allow to sort the model, improve sql query generation