libcore: Make fail handlers optional

Some users have no need for formatted fail messages and really can't
bear the code sizes that they require. See #17886.