France's former president Nicolas Sarkozy has lost his bid to overturn his five-year prison sentence.