This might be futile.
Fixes #376
This is a major clean-up of offers, tidying up the implementations and rewriting the test suite. This should also clean up some edge cases around the use of max_affected_items.
They weren't applying to lines properly. Fixed with test.