South Korea's top court upheld a seven-year prison sentence for ex-president Yoon Suk Yeol, over offences linked to his failed martial law declaration in 2024.