R/calculate_intensity.R: extract the mergeMatrix from plotFeatures function to make it a function of it's own

Signed-off-by: Charles Joly Beauparlant <Charles.Joly-Beauparlant@crchul.ulaval.ca>