close proxies before any other services are closed. This was causing near cache listener not being remove succesfully upon client shutdown. fixes #3669
moved the test
Merge pull request #3674 from sancar/fix/clientExceptionAtShutdown/maint3.x

Close proxies before any other services are closed.