dialyzer: fix a -Wunderspecs bug

Sometimes bogus warnings were generated for parametrized types.

Thanks to Krzesimir Sarnecki for pointing the bug out.

Also corrected warnings where the structure of opaque types were
exposed (thanks to Kostis for pointing the bug out).
Merge branch 'hb/dialyzer/bugfix/OTP-12111' into maint

* hb/dialyzer/bugfix/OTP-12111:
  dialyzer: fix a -Wunderspecs bug
dialyzer, hipe: Fix a bug concerning is_record/2,3

Also fixed some cases where Dialyzer could crash due to reaching
system limits.
Merge branch 'hb/dialyzer/bugfixes/OTP-12018' into maint

* hb/dialyzer/bugfixes/OTP-12018:
  dialyzer, hipe: Fix a bug concerning is_record/2,3