frontend: speedup /<owner>/<project>/builds/ route
Avoid the expensive aggregation query, and use a new index instead for
getting the newest build.
Note that I moved the index definitions down, because I wanted to use
the class attribute 'submitted_on' (previously not-yet-defined).