Update coherence rules to be more flexible for `impl Trait for Type`

See issue #5514

r? @pcwalton