Add tests for and refactor some methods in pytrainer.record.

* Use enumerate in pytrainer.record.Record.lapsFromGPX to avoid an O(N) lap index lookup.
* Improve handling of None in pytrainer.record.Record.hrFromLaps.