[bug] SEGV may occur in onig_error_code_to_str()

When a wrong error code is passed to onig_error_code_to_str(),
onig_error_code_to_format() may return NULL and it cause SEGV in
onigenc_str_bytelen_null(). Add NULL check.
(cherry picked from commit cb2f63c4bc8d37432973b35bec18a6dc17f3df2e)
[bug] /[a-c#]+\W/ =~ "def#" fails when encoding is UTF-16/32

(cherry picked from commit 609d0ea7d40a79bb1a68b9c9f73ac3067646cc9e)
Update HISTORY
Merge branch 'onig-5.9.x-mod' into onig-5.9.x-mod_for_bregonig-v2