Optimized TimespanInventory.split_at_offset().

The previous implementation used three full traversals of the inventory, while
the new implementation uses only one.