Use a UNION ALL for getting merge request notes

In this particular case the use of UNION ALL leads to a better query
plan compared to using 1 big query that uses an OR statement to combine
different data sources.

See for more
86 jobs for merge-request-notes-performance in 83 minutes and 17 seconds (queued for 17 seconds)