Leaked string in failure path.

Fix for Coverity perl5 CID 29058: Resource leak
(RESOURCE_LEAK) leaked_storage: Variable codeset going out of scope leaks the
storage it points to.

The savepv-ed codeset was not freed in failure path.
(The save_input_locale is freed just few lines later.)
slen may be uninitialized.

Fix for Coverity perl5 CID 29081: Uninitialized scalar
variable (UNINIT) uninit_use_in_call: Using uninitialized value slen when
calling Perl_croak.

If all fails, slen hasn't been set, and croak will be called with that.
Fix for Coverity perl5 CID 28936: Wrong operator used (CONSTANT_EXPRESSION_RESULT)

operator_confusion: ret->flags | 0x10 is always 1/true regardless of
the values of its operand. This occurs as the logical first operand of '&&'.
Did you intend to use '&' rather than '|'?

(confirmed by Karl Williamson)
Annotate intentional case fallthrough, or add breaks.

Fix suspicious (*) switch cases found by Coverity by
annotating with either "/* FALLTHROUGH */" or adding a break;

The FALLTHROUGH was much more common, but the break turned
out to be the right choice in three spots.  All changes tested
to work.

(*) suspicious = case1 + code + case2, and neither flow control
(like break) nor fallthrough annotation between code and case2.

Fix for Coverity perl5 CIDs 28977..28989, 45353.
Fix for Coverity perl5 CID 29068: Insecure temporary file (SECURE_TEMP) secure_temp: Calling mkstemp() without securely setting umask first.

The umask used for mkstemp should be secure, but umask 0600 has been
the required umask only since POSIX.1-2008.  In glibc 2.06 and earlier
the default was 0666, which is not secure.  And no explicit knowledge
of how well non-glibc platforms implement mkstemp.  Better err on the
side security, so set the umask temporarily to 0600, and then restore it.