Yarddoc vs coreexts

1. Hash core_ext: re-arrange tailing `unless` condition to be before; this is marginally more clear and also allows YARD to pick up the documentation.
2. String core_ext: same treatment, also apply the same #1051 fix that we did for Hash to make sure that our `#constantize` only gets defined if it hasn't been already.