[backend] implement small lastfailure database in the reposerver

This is done to speed up coolo's project status page.