Improve AbstractBasket lines cache handling

Currently, merge() only invalidated the line cache of the own instance,
and the public-facing merge_line() did not invalidate the cache at all.

Now, merge_line() invalidates the instances' line cache, and merge()
invalidates both instances' line cache.

I discovered this when using merge_line() to split a basket into
subbaskets and .is_empty would not reflect the current state.

Tests run through.