Avoid n+1 queries when downloading all submissions

Lots of queries are redundant in the logic of downloading all
submissions and can be avoided by eagerly loading the associations.

Tested:
- rspec
- rake test:units
- rake test:functionals
Merge pull request #1648 from zhangsu/download_all_submission_performance

Avoid n+1 queries when downloading all submissions