Carp: paranoid sub lookup

Carp avoids autovivifying stashes when seeing whether a sub like
utf8::is_utf8 or overload::StrVal exists.

Its logic was slightly faulty, in that it did not take into account
that the existence of $::{"utf8::"} does not indicate the presence
of a typeglob in that element.  It could have been created due to
autovivification.  It also failed to take into account that $utf8::’s
HASH slot might be empty.  This would result in death.

In fixing this, I moved the common logic into a single function
and also took the opportunity to avoid multiple hash lookups in
a row.