Fix #248: Class cannot inherit from refinement types

We now check that classes do not inherit from refinement types
(unless they are encodings of parameterized types), nor from
& or | types.

Review by @smarter.