Emit a proper diagnostic for a conformance that is not available due to
custom availability that doesn't have version information, eliminating
an assertion.
An always enabled availability domain is implicitly available in all contexts,
so uses of declarations that are marked as `@available` in the domain are never
rejected. This is useful for an availability domain representing a feature flag
that has become permanently enabled.
Partially resolves rdar://157593409.
Correct several behaviors of availability checking in unavailable contexts that
were inconsistent with the checking model:
- Avoid diagnosing unintroduced and obsolted declarations in contexts that are
unavailable in the same domain.
- Diagnose unavailability normally in type signature contexts.
Protocol requirement witnesses cannot only be available in a custom
availability domain if the requirement does not have the same availability
constraint.
Resolves rdar://156462516.
Serialization and IRGen don't yet support opaque return types that would depend
on querying availability of a custom domain so we need to reject this code to
avoid mis-compiling it.