YARN-1703. Fixed ResourceManager web-proxy to close connections correctly. Contributed by Rohith Sharma.