Write a query to merge rows in subscriptions into continuous coverage spans for each customer.
A period joins the current span when its starts_on is on or before the day after the latest covered ends_on so far. Merge overlaps, nested periods and next-day renewals. A start after an uncovered day begins a new span.
Return coverage_start, coverage_end and periods, the number of original subscription rows absorbed into the span. Nested periods count as source rows even when they do not extend coverage.
Ordering: Sort by customer, then coverage_start in ascending order.