Local variables have also been renamed, to describe their purpose and
not so much their type.
ht-history-prep now returns the new value of the hash table.
1. We were using gethash on chronometrist-events rather than
chronometrist-key-history 🤦♀
2. If an event has more than one key, determining the value of
old-keys in the outer loop meant that the first key would be
replaced by the second.
We also rename local variables so they tell us what objects they
represent, and reindent the code so it is more condensed.
1. chronometrist-events->time-list -> chronometrist-events->ts-pairs,
now returns a list of ts pairs. Rewritten using cl-loop.
2. chronometrist-time-list->sum-of-intervals ->
chronometrist-ts-pairs->durations, now returns a list of durations in
integer seconds.
3. A critical bug in chronometrist-iso-timestamp->ts was discovered -
we were passing the output of encode-time (via
parse-iso8601-time-string) to (make-ts :unix ...) - the latter expects
a number, not a list.
4. Both chronometrist-task-time-one-day and
chronometrist-events->ts-pairs were checking if a task was still
ongoing. Removed the redundant checking from the former.
5. Updated docstring of chronometrist-active-time-one-day
6. chronometrist-statistics-count-average-time-spent rewritten using
cl-loop
Also, when trying to write tests, I realized that
chronometrist-events-clean has long been removed. Removed a reference
to it from the manual and a docstring.