This way, consecutive history entries have matching origin/destination pairs,
and both the outer list and the inner origin/destination pair are sorted
by descending date.
Whether a user is in transit or not is now determined by an entry in the
in_transit table instead of a dangling checkin.
All completed journeys are stored in the "journeys" table.
This does most of the work needed for automatic checkout. However, note that
the corresponding worker process is not implemented yet.