Senegal court upholds prison term in key case against mayor