Added workaround for IrreducibleUnit comparisons
This PR fixes an issue with the custom IrreducibleUnit
s that are produced by gwpy.detector.units.parse_unit
when the unit string is not recognised. The patch is to use a dict
to cache the new units as they are created so that each unit string only gets mapped to a new unit once, allowed for equality comparisons with units of the same name (they are now the same object).
This is required for TimeSeries.is_compatible
and similar functions to pass on custom units.