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 #3675 from sancar/fix/clientExceptionAtShutdown/master

Close proxies before any other services are closed.