Cache subproject path

This becomes expensive when using weblate:// links.
Move fetching out of the loop
This validation was called twice
Except that index update entry does not exist

There usually should not be existing entry and get_or_create is too
expensive then - it needs extra select to figure out that there is
nothing. So be rather optimistic and recover from error when needed.
Avoid double saving
Calculate stats in single query

We can grab all counts in single query, there is no need to count
everything separately.