Core: guard against failed allocation during binary upgrade.

Patch by Piotr Sikora.


git-svn-id: svn://svn.nginx.org/nginx/trunk@5117 73f98a42-aea0-e011-b76d-00259023448c