Fix threshold for too high rate

Some rate plots were giving minus infinity when asking for a threshold that would give a rate higher than is available on the plot.  DoubleTkEle is one example.  This fixes that.
A lot of the changes in the diff are rearranging the unit tests, the actual fix is in src/tools/miscellaneous.cpp where I switched from using float to doubles for the linear fit.  There is also a small change in src/TriggerRatePlot.cpp for some edge case conditions.