R/calculate_intensity.R: removed the applyOnBamFiles function

Signed-off-by: Charles Joly Beauparlant <Charles.Joly-Beauparlant@crchul.ulaval.ca>
R/calculate_intensity.R: Added the prepareRegions function

Signed-off-by: Charles Joly Beauparlant <Charles.Joly-Beauparlant@crchul.ulaval.ca>
R/calculate_intensity: Important changes in the main data structure and in parseBamFiles function.

The old data structure stored the same data in multiple places. To avoid this, the raw counts and the rpm counts are
now stored in groups$raw and groups$rpm, respectively. These list contains as many elements as there are features groups, the
idea being that we parse different features in each features groups and that the information should not be redundant.

              |----- featuresGroup1    |----- bamFile1    |----- feature
groups$raw ---|----- featuresGroup2 ---|----- bamFile2 ---|----- feature2
              |----- ...               |----- ...         |----- ...
              |----- featuresGroupN    |----- bamFileN    |----- featureN

              |----- featuresGroup1    |----- bamFile1    |----- feature
groups$rpm ---|----- featuresGroup2 ---|----- bamFile2 ---|----- feature2
              |----- ...               |----- ...         |----- ...
              |----- featuresGroupN    |----- bamFileN    |----- featureN

Note: bamFiles include input and controls.

Description of the main data structure:

design:			The design parsed from the design file. (optional)
param:			The params that were used (some may be empty depending on the type of input used):
			 * specie
			 * cores
			 * paddingSize
			 * maxDistance
bamFileDescription:	The data frame that contains relevant information about the bam files:
			 * oldBam:		The original names of the bam files.
			 * bam:			The name of the sorted bam files (if original file are already sorted,
						this column is identical to oldBam).
			 * alignedCount:	The number of aligned reads for the current bam file.
regionsGroups:		The list of every groups of features to include in the analysis. The data is currently stored
			in a data frame (relevant columns are: "space", "start_position" and "end_position").
data:			The data that is specific to every featuresGroup/designGroup in the analysis.
			Each combination is a list that contains:
			 * featureName:		The name of the current features group.
			 * designName:		The name of the current design group.
			 * bamFiles:		The names of the bam files (input and control) used for that combination.
			 * mergedControls:	If multiple controls were used, this list contains the average value for
						every features in current combination. Otherwise, it contains the same
						data that the original rpm version of the control bam file.
			 * noCTRL:		The normalized counts for every input bam files with the values of the
						merged control substracted.
raw:			The raw counts for every bam files in the current experiment.
rpm:			The normalized count for every bam files in the current experiment.

The new version of parseBamFiles is a splitted version of the old one:
 * The parseBamFiles now only returns raw counts.
 * Added a rawCountsToRPM function that normalize raw counts.
 * The removeControls was recoded to fit with the new data structure and should also be more memory efficient.

The old version of parseBamFiles is now deprecated but still not completely removed from the code (parseBamFiles.old).
The old version of removeControls is now deprecated but still not completely removed from the code (removeControls.old).

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