Work around ActiveRecord count and column aliases issue as described at:
<https://github.com/rails/rails/issues/15138#issuecomment-61325080>
AR doesn't promise that `#count` (which is called by `#any?`) will work
for relations using `#select`, which means we need a workaround instead.
This will be useful when you want to ask for the
number of items and later iterate over them, without
needing to ask if the association is load or not.
So you avoid extra database queries
Separate reference gathering from rendering
This is a required step to allow batch processing when gathering references. This in turn would allow grabbing (for example) all mentioned users of an issue/merge request using a single query.
cc @rspeicher @DouweM
See merge request !3969
Loads move issue dropdown async
To keep the style of the dropdown the same as the other dropdowns in the issue form, it uses select2 rather than our new dropdowns.

Closes#16563
See merge request !4160
Issuable filtering improvements
This improves the filtering of issues and merge requests by creating a single file that encapsulates all the filtering. Previously this was done with a file for issues and a file for merge requests.
Created the ability for the text search to be done alongside other filterables. Previously because this was outside the filterable form, this wasn't possible and would instead do either filter dropdown or text filter - not both. Fixes#4252
Fixed issue with not being able to filter and sort issues without refreshing the page. Fixes#15269
See merge request !3699
Issuable form due date
For some reason, this was never in the original merge request for due date?

Closes#15516
See merge request !3895
Wrap "No groups found" message with a .nothing-here-block
The "No groups found" message's style is inconsistent with the other empty messages.
## Screenshots
### Empty groups

### Empty projects

See merge request !4137
This improves the filtering of issues and merge requests by creating a single file that encapsulates all the filtering. Previously this was done with a file for issues and a file for merge requests.
Created the ability for the text search to be done alongside other filterables. Previously because this was outside the filterable form, this wasn't possible and would instead do either filter dropdown or text filter - not both.