Also build PerlIO_get_layers with -Dusesfio

This extends patch 5fef3b4a7f0c97d3 from April 2003 from fixing the
stdio-only build to also fix the sfio build, which was broken when
PerlIO_get_layers was added (2 commits previously, 39f7a87036eb8d13).
Without this fix, perl would refuse to build with -Dusesfio.

Given that 39f7a87036eb8d13 was merged to maint-5.8, this means that the
-Dusesfio build was broken for v5.8.1 and later on that branch, as well as
for v5.10.0 and all subsequent releases. Given that in the past 10 years,
no-one has reported this, it's safe to assume that no-one considers sfio
support to be important.
Fix sfio breakage in PerlIO_findFILE() caused by commit de009b76d60bdeb8.

One hunk of commit de009b76d60bdeb8 (April 2005) makes a variable const,
which is then assigned to. This is in sfio-specific code, so was not noticed.
This change was merged to maint-5.8 as part of commit f1c3982b668c9e30 (Sep
2005).
Fix sfio breakage caused by the addition of PERLIO_TERM in Oct 2006.

Commit 6cb8cb214e85c7d6 in Oct 2006 added a new macro PERLIO_TERM, but didn't
provide an approriate definition for the sfio build. Commit 6b29934bd65555b7
(also Oct 2006) plus this change provides a working PERLIO_TERM for sfio.
Fix a typo introduced in Nov 2008 by commit 4ee3916907333148.

Once use of dSAVE_ERRNO mistyped as dSAVED_ERRNO, but as it was in the
sfio-only code it was not spotted.
Fix sfio breakage caused by the fix for RT #78494.

Commit 2e0cfa16dea85dd3 (Feb 2011) fixed RT #78494, but inadvertently broke
non-PerlIO configurations. -Uuseperlio was restored in March 2011 with commit
b6ae43b72863e12d, but this change is needed to restore the sfio build.

This is the last fix needed to get blead building with -Dusesfio, after 10
years of breakage. However, many many tests still fail (and one hangs).
Note, specifically this is only tested with sfio97. Perl is making a couple
of cheating assumptions which break with sfio2005, and I've not attempted to
fix Perl's naughtiness to get it to build with current sfio. (Nor has anyone
else in the past 8 years, it would seem. Or even reported a problem.)