S. Korean top court upholds former president's sentence