Fix ordering the issues by author or assignee
The solution we had was relying on code added in sqlalchemy 1.0.0 while
this is newer than the sqlalchemy version in production.
This falls back to older (but also working) code.
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr></pingou@pingoured.fr>