Improve handling of overloaded labels, literals, lists etc

When implementing Quick Look I'd failed to remember that overloaded
labels, like #foo, should be treated as a "head", so that they can be
instantiated with Visible Type Application. This caused #19154.

A very similar ticket covers overloaded literals: #19167.

This patch fixes both problems, but (annoyingly, albeit temporarily)
in two different ways.

Overloaded labels

I dealt with overloaded labels by buying fully into the
Rebindable Syntax approach described in GHC.Hs.Expr
Note [Rebindable syntax and HsExpansion].

There is a good overview in GHC.Rename.Expr
Note [Handling overloaded and rebindable constructs].
That module contains much of the payload for this patch.

Specifically:

* Overloaded labels are expanded in the renamer, fixing #19154.
  See Note [Overloaded labels] in GHC.Rename.Expr.

* Left and right sections used to have special code paths in the
  typechecker and desugarer.  Now we just expand them in the
  renamer. This is harder than it sounds.  See GHC.Rename.Expr
  Note [Left and right sections].

* Infix operator applications are expanded in the typechecker,
  specifically in GHC.Tc.Gen.App.splitHsApps.  See
  Note [Desugar OpApp in the typechecker] in that module

* ExplicitLists are expanded in the renamer, when (and only when)
  OverloadedLists is on.

* HsIf is expanded in the renamer when (and only when) RebindableSyntax
  is on.  Reason: the coverage checker treats HsIf specially.  Maybe
  we could instead expand it unconditionally, and fix up the coverage
  checker, but I did not attempt that.

Overloaded literals

Overloaded literals, like numbers (3, 4.2) and strings with
OverloadedStrings, were not working correctly with explicit type
applications (see #19167).  Ideally I'd also expand them in the
renamer, like the stuff above, but I drew back on that because they
can occur in HsPat as well, and I did not want to to do the HsExpanded
thing for patterns.

But they *can* now be the "head" of an application in the typechecker,
and hence something like ("foo" @T) works now.  See
GHC.Tc.Gen.Head.tcInferOverLit.  It's also done a bit more elegantly,
rather than by constructing a new HsExpr and re-invoking the
typechecker. There is some refactoring around tcShortCutLit.

Ultimately there is more to do here, following the Rebindable Syntax
story.

There are a lot of knock-on effects:

* HsOverLabel and ExplicitList no longer need funny (Maybe SyntaxExpr)
  fields to support rebindable syntax -- good!

* HsOverLabel, OpApp, SectionL, SectionR all become impossible in the
  output of the typecheker, GhcTc; so we set their extension fields to
  Void. See GHC.Hs.Expr Note [Constructor cannot occur]

* Template Haskell quotes for HsExpanded is a bit tricky.  See
  Note [Quotation and rebindable syntax] in GHC.HsToCore.Quote.

* In GHC.HsToCore.Match.viewLExprEq, which groups equal HsExprs for the
  purpose of pattern-match overlap checking, I found that dictionary
  evidence for the same type could have two different names.  Easily
  fixed by comparing types not names.

* I did quite a bit of annoying fiddling around in GHC.Tc.Gen.Head and
  GHC.Tc.Gen.App to get error message locations and contexts right,
  esp in splitHsApps, and the HsExprArg type.  Tiresome and not very
  illuminating.  But at least the tricky, higher order, Rebuilder
  function is gone.

* Some refactoring in GHC.Tc.Utils.Monad around contexts and locations
  for rebindable syntax.

* Incidentally fixes #19346, because we now print renamed, rather than
  typechecked, syntax in error mesages about applications.

The commit removes the vestigial module GHC.Builtin.RebindableNames,
and thus triggers a 2.4% metric decrease for test MultiLayerModules
(#19293).

Metric Decrease:
    MultiLayerModules
    T12545
24 jobs for master in 463 minutes and 15 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Tool Lint
passed #594408
lint
lint-linters

00:00:59

failed #594411
lint allowed to fail
lint-submods

00:00:14

passed #594412
lint
lint-submods-branch

00:00:23

passed #594409
lint
lint-testsuite

00:01:00

passed #594410
lint
typecheck-testsuite

00:00:14

 
  Quick Build
passed #594413
x86_64-linux
hadrian-ghc-in-ghci

00:13:12

 
  Lint
passed #594414
lint
lint-base

00:19:34

 
  Build
passed #594415
x86_64-linux
stack-hadrian-build

00:09:46

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

01:52:28

 
  Full Build
failed #594419
aarch64-linux allowed to fail
validate-aarch64-linux-deb10

00:54:30

failed #594420
armv7-linux allowed to fail
validate-armv7-linux-deb10

02:36:44

passed #594421
x86_64-linux
validate-i386-linux-deb9

01:24:35

failed #594418
x86_64-darwin
validate-x86_64-darwin

01:08:36

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

01:42:51

passed #594425
x86_64-linux
validate-x86_64-linux-deb9-dwarf

02:10:08

passed #594423
x86_64-linux
validate-x86_64-linux-deb9-integer-simple

01:25:04

manual #594424
x86_64-linux allowed to fail manual
validate-x86_64-linux-deb9-tsan
passed #594417
x86_64-linux
validate-x86_64-linux-deb9-unreg-hadrian

02:49:20

passed #594426
x86_64-linux
validate-x86_64-linux-fedora27

01:41:05

passed #594427
new-x86_64-windows test
validate-x86_64-windows-hadrian

03:54:09

 
  Packaging
passed #594428
x86_64-linux
doc-tarball

00:04:57

 
  Testing
manual #594429
x86_64-linux allowed to fail manual
hackage
passed #594431
x86_64-linux-perf
perf

00:02:21

passed #594430
x86_64-linux
perf-nofib

00:17:33

 
Name Stage Failure
failed
lint-submods Tool Lint
Entering 'libraries/unix'
Entering 'libraries/xhtml'
Entering 'nofib'
Entering 'utils/haddock'
Entering 'utils/hsc2hs'
Authenticating with credentials from job payload (GitLab Registry)
$ git fetch "$CI_MERGE_REQUEST_PROJECT_URL" $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
fatal: no path specified; see 'git help pull' for valid url syntax
ERROR: Job failed: exit code 1
failed
validate-aarch64-linux-deb10 Full Build
Uploading artifacts...
WARNING: ghc-aarch64-linux-deb10.tar.xz: no matching files
WARNING: junit.xml: no matching files
WARNING: performance-metrics.tsv: no matching files
ERROR: No files to upload
Uploading artifacts...
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
validate-armv7-linux-deb10 Full Build
Uploading artifacts...
ghc-armv7-linux-deb10.tar.xz: found 1 matching files

junit.xml: found 1 matching files

performance-metrics.tsv: found 1 matching files

Uploading artifacts to coordinator... ok
id=594420 responseStatus=201 Created token=u4TET2z8
Uploading artifacts...
junit.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=594420 responseStatus=201 Created token=u4TET2z8
ERROR: Job failed: exit code 1
failed
validate-x86_64-darwin Full Build
ghc-x86_64-apple-darwin.tar.xz: found 1 matching files and directories 
junit.xml: found 1 matching files and directories

performance-metrics.tsv: found 1 matching files and directories

Uploading artifacts as "archive" to coordinator... ok
id=594418 responseStatus=201 Created token=ERweMBbg
Uploading artifacts...
Runtime platform
arch=amd64 os=darwin pid=6267 revision=6214287e version=13.1.0
junit.xml: found 1 matching files and directories

Uploading artifacts as "junit" to coordinator... ok
id=594418 responseStatus=201 Created token=ERweMBbg
ERROR: Job failed: exit status 1