posix.t, time.t: Correct saving/restoring locales

Code in these two tests assumed that setlocale returns the old locale.
Instead it returns the new one.  A separate setlocale() call is needed
to get the previous locale value.  These are the only two places I found
with this error.
lib/locale.t: Move some lines

Commit b99851e1941e002dd4816ee6c76fd49bbee1d7f3 should have added tests
at the end of the block.  This moves them.
lib/locale.t: Add tests

Commit b99851e1941e002dd4816ee6c76fd49bbee1d7f3 should have added tests
in two places.  This adds them in the second place, plus a cautionary
comment.  The reason for the two places is the alternative I can think
of is to use a string eval, but that perturbs the test environment so
might affect the outcome.
run/locale.t: Fix bareword error

This string should be in quotes to be properly eval'd.  Prior to this
patch this .t failed when run by hand as the bareword warning is made
fatal.
perllocale: Note that LC_MESSAGES affects $^E