Fix SEGVs and test failures for -DPERL_GLOBAL_STRUCT_PRIVATE

With PERL_GLOBAL_STRUCT_PRIVATE "global" variables are in a structure in
malloc()ed memory, not in global static variables or a global static
structure. Hence no global variables are implicitly initialised to zero.

* PL_curinterp, PL_op_sequence and PL_watch_pvx need initialising to NULL.
* The global structure is free()d before handlers registered with atexit()
  run, so be defensive about this.
* Some C code checks SvOK(PL_sv_placeholder) so ensure that its SvFLAGS()
  are 0.
* Zero PL_hash_seed.
For -DPERL_GLOBAL_STRUCT, eliminate local variable plvarsp in main().
Avoid read-after-free in S_scan_heredoc() if the terminator line has no "\n".

The code added by commit 112d128413206514 to fix RT #65838 (Allow here-doc
with no final newline) could in some rare cases cause a read of free()d
memory during parsing. The code itself is only run if the Perl program
ends with a heredoc (which is an unusual structure), and if the last line of
the file on disk has terminating newline character (which is also unusual,
as many editors default to adding a final newline). The bug would be
triggered if the fixup code in S_scan_heredoc() triggered a reallocation of
the buffer in PL_linestr when adding a newline to it.