IOSessionImpl: use double checks whenever it is possible to reduce synchronized scope
Contributed by Dmitry Potapov <dpotapov at yandex-team.ru>

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.4.x@1638961 13f79535-47bb-0310-9956-ffa450edef68