Add maximum_events option to competition Calculator

Allow rules like 'best 5 of 6 events'. Duplicate logic from Competition base class.