Optimise substr assignment at sub exit

The assignment in substr(...) = ... gets optimised away in void con-
text.  We can also optimise it away at sub exit as long as this is not
an lvalue sub and pp_substr returns the replacement when optimised.
Optimise ‘return’ away at end of lv sub