Router: fixing assertion in shortage of file descriptors.
Router: fixing assertion in shortage of file descriptors.

Each application in router process required fd for a request queue shared
memory.  When the number of file descripts close to the limit, and port sockets
successfully opened, router needs to properly handle the errors.

This patch closes port sockets before destroying port structure to avoid
file descriptors leakage and assertion in debug build.

nginx/unit,nginx/unit,nginx/unit,nginx/unit,nginx/unit,nginx/unit,nginx/unit,nginx/unit,nginx/unit,nginx/unit,nginx/unit