perliol.pod: Correct flags type in _PerlIO struct

This is not the only change that was not reflected in the docs.  There
is also a PerlIOl *head member, but I don’t know whether this should
be considered public and documented.
Record errno value in IO handles
Increase $PerlIO::scalar::VERSION to 0.20
Increase $PerlIO::encoding::VERSION to 0.20
Have close() set $! and $^E

This is what we used to get when close reported an error after a print
failure (‘Disk Image’ is a small disk image I made):

$ ./miniperl -Ilib -e 'open fh, ">/Volumes/Disk Image/foo"; print fh "x"x1000, "\n" for 1..50; unlink "ntoeuhnteo"; warn $!; close fh or die "error closing: $!"'
No such file or directory at -e line 1.
error closing: No such file or directory at -e line 1.

Notice how the value of $! as set by unlink is still present after
close fails.  So that means after close returns false, you can’t
depend on $! to have the reason for the failure, because it might come
from an unrelated system call.  Remove the ‘unlink’ statement and you
get ‘No space left on device’.

As of this commit, the output is more helpful:

$ ./miniperl -Ilib -e 'open fh, ">/Volumes/Disk Image/foo"; print fh "x"x1000, "\n" for 1..50; unlink "ntoeuhnteo"; warn $!; close fh or die "error closing: $!"'
No such file or directory at -e line 1.
error closing: No space left on device at -e line 1.

Three commits ago, I/O errors started recording the error number in
the handle itself.  Now ‘close’ restores $! and $^E to the values they
were when the I/O error associated with the closed handle occurred.

This is related to ticket #57512.
[perl #57512] Warnings for implicitly closed handles

If the implicit close() fails, warn about it, mentioning $! in the
message.  This is a default warning in the io category.

We do this in two spots, sv_clear and gp_free.  While sv_clear would
be sufficient to get the warning emitted, the warning won’t contain
the name of the handle when called from there, because lone IO thing-
ies are nameless.  Doing it also when a GV’s glob pointer is freed--as
long as the IO thingy in there has a reference count of 1--allows the
name to be included in the message, because we still have the glob,
which is where the name is stored.

The result:

$ ./miniperl -Ilib -e 'open fh, ">/Volumes/Disk Image/foo"; print fh "x"x1000, "\n" for 1..50; undef *fh'
Warning: unable to close filehandle fh properly: No space left on device at -e line 1.
[Merge] Warnings for implicitly closed handles

This branch contains two notable changes:

• I/O errors now record the value of $! in the handle, and close
  restore the save value of $!, so close||die$! is more predictable
  than before.

• Implicitly closed handles now emit warnings if an I/O error has
  occurred [perl #57512].