Stop Constant(%s) errors from leaking
This error message uses yyerror, so it doesn’t abort immediately, but
adds it to the queue of error messages.
If there are ten accumulated errors, however, yyerror croaks with a
‘too many errors’ message.
In that circumstance these messages were leaking scalars.
Instead of creating an SV especially to hold the message to pass to
yyerror and then freeing it afterwards, we can instead use Perl_form,
which reuses the same SV every time (PL_mess_sv), eliminating that
leak. In doing so, we can also combine this with another yyerror/
return in the vicinity, avoiding duplicate code.
The sv passed to S_new_constant was also leaking. When there is no
error, it is currently mortalised. When there is an error, it also
needs to be mortalised, in case it is a fatal error. So this commit
changes it to mortalise it unconditionally. This means we have to
SvREFCNT_inc the return value on error.