ISPN-2699 Transport object factory propagates Ping exceptions

5.2.x branch: `t_2699_5`

* Changed the way response header is changed so that all values are read as soon as possible, hence reducing the chances of sockets being left with unread data in case of any exception.
* Use generics properly in Apache pool object factory implementation for Transport objects.
* RetryOnFailureOperation now invalidates a Transport object in the pool if a TransportException is received. This is necessary so that those Transport objects that are invalid can be destroyed and hence any sockets left open can be closed properly.
* Cleaned up references to InetSocketAddress and replaced them with references to SocketAddress.
* Parsing related errors should invalidate transport instance since often these are the consequence of previous errors. This way, next time a client sends an operation to the server, a brand new connection will be used.