Change the way the mean is calculated

Instead of calculating the mean each time, calculates a cumulative sum, and then takes the relevant segment.
Minor changes to the integrate_from_crossing so that it calculates the terminals within it (as the execution time has been increased)

Added temporary print statements to find the execution times.
Add a cumsum method which produces a cumulative sum of the indices.
Merge branch 'master' of https://github.com/JP-Ellis/Cool-Roof