8c87939 frontend: memory optimize /packages/ and /builds/ routes

Authored and Committed by praiskup 4 years ago
    frontend: memory optimize /packages/ and /builds/ routes
    
    To have properly generated "stream" feeling from streamed jinja, we need
    to have streamed sqlalchemy result set as well.  So yield_per helped a
    lot in case of /builds/.
    
    With packages, it's not that trivial -- we can not use yield_per easily
    because we do some in-app processing of the query.  But considering that
    the number of packages is much smaller than the number of builds, we can
    afford it - we only need to limit the number of information given to
    the template (so we throw away build.build_chroots basically).
    
    Merges: #1210