Added more extensive unit tests.
Fixed a few bugs discovered by unit testing.
Bugfix: in some situations history samples can have later timestamps than live samples (e.g. when PV is disconnected or updating really slowly). This may result in the trend line being plotted back in time.
Bugfix: The regular expression was updated to include the grouping separator (,) and parsing of number has been updated to properly parse numbers in format 432,432.443.