change the behavior of RecordingEndpoint so it will remove itself from the engine after all input tracks are removed.
fix a bug in the engine regarding handling subscribe messages from an endpoint that does not exist. When the engine receives a subscribe message from an existing endpoint, it will throw an exception because we are trying to refer to non-existing data. It is fixed by checking if the endpoint that tries to subscribe on track exists in the engine, and if not, a proper message is returned to the endpoint.
This PR consists of two parts: