Have clamp throw a DomainError if interval is poorly defined

One possible solution to #8006