MiscUtils: use more succinct code for equal method

One thousand thanks to Johannes Schindelin for the inspiration!!