Internal: allow InternalEngine to be stopped and started

Once the current engine is started you can only close it once. Once closed the engine cannot be started again. This commit adds a stop method which signals the engine to free it's resources but in a way that allows restarting.

This is done by making InternalEngine a wrapper around InternalEngineImpl which maintains the start once, close once semantics. This allows to add the stop() method without adding complexity the engine implementation. InternalEngine is maintained as an entry point for listeners (incoming and outgoing) to other ES components, which removes the need to add/remove them if the engine is stopped.

Needed for #8720 

cleaned up a bit