Manually revert "Rationalise RX_MATCH_UTF8_set()"

Commit 0254aed965 says in its message, among other things:

    Now that the RXf_MATCH_UTF8 flag on a regex is just used to indicate
    whether the captures on a successful match are utf8, only set
    this flag at the end of a successful match, rather than at the start of
    the match.

But if we only set the utf8 flag at the end of the match, then $^N
accessed within the match will have the flag wrongly set.
(cherry picked from commit ab4e48c10a3551d7cfb88a2e29d82e0b499712e1)
[perl #123135] Tests for utf8 $^N within match

(cherry-picked from 9c6c921b)
perldelta for ab4e48c10a / #123135
(cherry picked from commit 53795ef8027c9585205bd1d0a78eca362ec8a453)