Fix x-error callback + Code refactor
The x-error callback was never called because of a wrong media player state and the fact that the media player was set to nil before its state check.
Code refactor around the XCallbackURLHandler and the VLCCallbackURLHandler to ease the code's readability, its understanding and group some parts that were repeated.