**Backport:** https://codeberg.org/forgejo/forgejo/pulls/7976
- Expired artifacts are kept in the database but the artifact has been deleted from the storage. Ignore them for the quota calculation.
- Added unit test.
Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7985
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>