VidjilAuth.py: Unnest SQL queries

Those queries were taking ages while unnesting them make them
much faster. A more decent solution would be to use an inner join.

See and fixes #3169
2 jobs for hotfix-s/3169-unnest-sql-queries in 26 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Test Tools
passed #89453
test_tools

00:00:03

 
  Test Unit
failed #89454
web
test_server_unit

00:00:23

 
Name Stage Failure
failed
test_server_unit Test Unit There is an unknown failure, please try again
Makefile:12: recipe for target 'unit' failed
make[1]: *** [unit] Error 1
make[1]: Leaving directory '/home/gitlab-runner/builds/b8d876c1/0/vidjil/vidjil/server'
Makefile:40: recipe for target 'unit_server' failed
make: *** [unit_server] Error 2
make: Entering directory '/home/gitlab-runner/builds/b8d876c1/0/vidjil/vidjil/server'
pkill -f fuse_server.py
make: Leaving directory '/home/gitlab-runner/builds/b8d876c1/0/vidjil/vidjil/server'
ERROR: Job failed: exit status 1