Accidentally using different types for the lower and upper endpoint produces a `ClassCastException` when validating that the lower endpoint isn't above the upper endpoint. This is a little surprising.

For example, the following:

```java
Range<? extends Number> range = Range.closedOpen(0, 1.0);
```

results in

```
java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.Integer
        at java.lang.Integer.compareTo(Integer.java:52)
        at com.google.common.collect.Range.compareOrThrow(Range.java:690)
        at com.google.common.collect.Cut.compareTo(Cut.java:77)
        at com.google.common.collect.Range.<init>(Range.java:349)
        at com.google.common.collect.Range.create(Range.java:155)
        at com.google.common.collect.Range.closedOpen(Range.java:189)
```

(In the actual code I'm looking at, the `range` variable is a function parameter that must accept numeric ranges of different types, so it's less weird than it looks here.)

Now, the range produced here _is_ completely invalid, and there's no way that the compiler can check this (because we can't express that the two bounds parameters must be the same concrete type, or at worst be mutually comparable).

However, it would be nice if `Range.compareOrThrow()` caught `ClassCastException` and returned a clearer message, or just chained the CCE onto the "Invalid range" `IllegalArgumentException` it can already throw.

I note that `Range.compareOrThrow()` has a "may throw CCE" comment, but the only place that this exception is mentioned otherwise is in the Javadoc for `Range.encloseAll()` and a comment in `Range.contains()`, both of which are talking about their function arguments.
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.SortedSet;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
/**
 * A range (or "interval") defines the <i>boundaries</i> around a contiguous span of values of some
 * {@code Comparable} type; for example, "integers from 1 to 100 inclusive." Note that it is not
 * possible to <i>iterate</i> over these contained values. To do so, pass this range instance and an
 * appropriate {@link DiscreteDomain} to {@link ContiguousSet#create}.
 *
 * <h3>Types of ranges</h3>
 *
 * <p>Each end of the range may be bounded or unbounded. If bounded, there is an associated
 * <i>endpoint</i> value, and the range is considered to be either <i>open</i> (does not include the
 * endpoint) or <i>closed</i> (includes the endpoint) on that side. With three possibilities on each
 * side, this yields nine basic types of ranges, enumerated below. (Notation: a square bracket
 * ({@code [ ]}) indicates that the range is closed on that side; a parenthesis ({@code ( )}) means
 * it is either open or unbounded. The construct {@code {x | statement}} is read "the set of all
 * <i>x</i> such that <i>statement</i>.")
 *
 * <blockquote>
 *
 * <table>
 * <caption>Range Types</caption>
 * <tr><th>Notation        <th>Definition               <th>Factory method
 * <tr><td>{@code (a..b)}  <td>{@code {x | a < x < b}}  <td>{@link Range#open open}
 * <tr><td>{@code [a..b]}  <td>{@code {x | a <= x <= b}}<td>{@link Range#closed closed}
 * <tr><td>{@code (a..b]}  <td>{@code {x | a < x <= b}} <td>{@link Range#openClosed openClosed}
 * <tr><td>{@code [a..b)}  <td>{@code {x | a <= x < b}} <td>{@link Range#closedOpen closedOpen}
 * <tr><td>{@code (a..+∞)} <td>{@code {x | x > a}}      <td>{@link Range#greaterThan greaterThan}