Fix async issues in StaticServer unit tests

Fix for #3645

Change StaticServer unit tests to share the NodeConnection Deferred to detect connection. Cleanup logging event handlers.