Frenchman Charles Sobhraj, a serial killer portrayed in a hit BBC drama, will be released and deported.