N+1 queries from notes that reference issues in "more actions" dropdown
If we look at the profile of loading issue 1 (http://profiler.gitlap.com/20170709/fe0a8613-75f9-442d-86ea-0e0c6510f439.html.gz and http://profiler.gitlap.com/20170709/fe0a8613-75f9-442d-86ea-0e0c6510f439.txt.gz), we see 8-9% of the load time is caused by building a URL for an issue:
This happens because for a given note that has this dropdown:
For each note that references an issue, we look up the issue and build the URL to it.
/cc: @lbennett, @smcgivern