order by field on aggregate
order by field on aggregate

this commit updates aggregate asking for $max or $min in a
group in order to always have the expected value considering
that group doesn't maintain the order.

Signed-off-by: Alexandra Pereira <3a342c1bdecbd5658e678a2b747eb05e17e53555@collabora.com>

kernelci/kernelci-backend,kernelci/kernelci-backend