4063c2e frontend: speedup /<owner>/<project>/builds/ route

Authored and Committed by praiskup 2 years ago
    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).