PmCheck: Identify some semantically equivalent expressions

By introducing a `CoreMap Id` to the term oracle, we can represent
syntactically equivalent expressions by the same `Id`. Combine that with
`CoreOpt.simpleCoreExpr` and it might even catch non-trivial semantic
equalities.

Unfortunately due to scoping issues, this will not solve #17208 for
view patterns yet.
21 jobs for master in 220 minutes and 45 seconds (queued for 8 seconds)
Status Job ID Name Coverage
  Lint
passed #173243
lint
lint-linters

00:00:25

passed #173246
lint
lint-submods-branch

00:00:20

passed #173244
lint
lint-testsuite

00:00:23

passed #173245
lint
typecheck-testsuite

00:00:17

 
  Build
failed #173248
x86_64-linux
hadrian-ghc-in-ghci

00:10:26

passed #173250
x86_64-linux
release-x86_64-linux-deb9-dwarf

01:42:02

passed #173249
x86_64-linux
validate-x86_64-linux-deb9-debug

03:28:15

passed #173247
x86_64-linux
validate-x86_64-linux-deb9-hadrian

01:59:36

 
  Full Build
skipped #173252
aarch64-linux allowed to fail
validate-aarch64-linux-deb9
skipped #173253
x86_64-linux
validate-i386-linux-deb9
skipped #173251
x86_64-darwin
validate-x86_64-darwin
skipped #173254
x86_64-linux
validate-x86_64-linux-deb9-integer-simple
skipped #173255
x86_64-linux
validate-x86_64-linux-deb9-unreg
skipped #173256
x86_64-linux
validate-x86_64-linux-fedora27
skipped #173258
x86_64-windows allowed to fail
validate-x86_64-windows
skipped #173257
x86_64-windows allowed to fail
validate-x86_64-windows-hadrian
 
  Cleanup
passed #173259
x86_64-darwin
cleanup-darwin

00:00:06

 
  Packaging
skipped #173260
x86_64-linux allowed to fail
doc-tarball
 
  Testing
skipped #173261
x86_64-linux allowed to fail manual
hackage
skipped #173262
x86_64-linux
perf-nofib
 
  Deploy
skipped #173263
x86_64-linux allowed to fail
pages
 
Name Stage Failure
failed
hadrian-ghc-in-ghci Build
hadrian-0.1.0.0). The exception was:
user error (hTryLock: lock already exists:
/home/ghc/.cabal/packages/hackage.haskell.org/hackage-security-lock)
Failed to download utf8-string-1.0.1.1 (which is required by exe:hadrian from
hadrian-0.1.0.0). The exception was:
user error (hTryLock: lock already exists:
/home/ghc/.cabal/packages/hackage.haskell.org/hackage-security-lock)

ERROR: Job failed: exit code 1