Issue 9982 case(b) wrong code for dotvar pointer assign

The existing code was complicated and just plain wrong.
Fix bug 10211: CTFE: Allow cast S**->D**, if S*->D* is OK
Fix bug 10252 CTFE: Generate error for shr/ushr/shl out of range

Use same behaviour as for const-folding.
Fix issue 10551 CTFE array pointer passed by ref

IndexExp needs to consider the case where we need a reference
Fix issue 10858 CTFE wrong array of pointers

Pointer comparison should be based on rvalues, not lvalues.
That bug was also hiding two latent wrong-code bugs.
Merge pull request #2552 from donc/d1mergectfe

D1 Merge: bugfixes for 9982, 10211, 10252, 10551, and 10858