core: remove polling for Drain/IsEmpty
At the end of the stream, the input MainLoop will poll every 100 millseconds the Empty
state of the es_out, via the following path:
input_thread_t MainLoop
-> es_out_GetEmpty
-> vlc_input_decoder_IsEmpty
-> vout_IsEmpty
or aout_IsDrained
Instead, the drained/empty state should be signalled from the outputs to the input_thread_t (via es_out_t/vlc_input_decoder_t).
This will also remove a possible extra delay between 0 and 100ms when a stream is terminated.
I set the milestone for 5.0 because it was not planned for 4.0. But this change doesn't necessarily need to modify any plugins and can be done "easily". In that case, feel free to assign you this issue.