Cache the number of open issues and merge requests

Merged yorickpeterse-staging requested to merge cache-issue-and-mr-counts into master

What does this MR do?

This MR adds caching mechanisms for the open issues and MR counters displayed in the project navigation (side)bar. This reduces the loading times of all pages displaying this data (basically any project page) by up to 60 milliseconds.

There is a potential exposure risk associated with the implementation which is mentioned in and in the commit message.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

cc @rspeicher @briann

Edited by yorickpeterse-staging