localeinit.c: codepage format

* localeinit.c (SIZEOF_CP_NAME, CP_FORMAT): extract to share
  codepage formatting code.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e