Faster filtering on submission API v2 endpoint
Faster filtering on submission API v2 endpoint

Instead of joining the user table and looking up the username, we can
simply look up the profile ID and use the index. A similar optimization
is done for problems. Fixes #1584.

DMOJ/site,DMOJ/site,DMOJ/site,DMOJ/site