Periodic schedule deduplication of dates bug fix


While using Strata for FixedCouponBond interest calculation, we noticed a bug in the code as described below.

Bug Fix MR:

Bug Description:
When creating a schedule from a periodic schedule, there is a deduplication logic if we pass “combinePeriodsIfNecessary” flag as true:

But if there are more than 2 duplicates of same element, the deduplication is only removing first instance of duplicate.
adj = [“2020-01-01”,“2020-01-02”,“2020-01-03”,“2020-01-06”,“2020-01-06”,“2020-01-06”,“2020-01-07”]
After deuplcation:
adj = [“2020-01-01”,“2020-01-02”,“2020-01-03”,“2020-01-06”,“2020-01-06”,“2020-01-07”]

Thanks for the PR which is now merged