Given a list of closed intervals [start, end] with 0 <= start <= end, merge all intervals that overlap or touch and return a minimal set of non-overlapping intervals sorted by start. Implement an algorithm with O(n log n) time (due to sorting) and as little extra space as possible beyond the output. Clarify how to treat touching endpoints (e.g., [1,3] and [3,5]), zero-length intervals (e.g., [4,4]), and invalid inputs. Provide tests for nested intervals, duplicates, already-sorted input, reverse-sorted input, and large inputs (up to 1e5 intervals).