Fix assert crash when an unregistered dialect op is encountered during
parsing and `-allow-unregistered-dialect' isn't on. Instead, emit an
error.
While on this, clean up "registered" vs "loaded" on getDialect() and
local clang-tidy warnings.
https://llvm.discourse.group/t/assert-behavior-on-unregistered-dialect-ops/4402