Ghosn resigns from top Renault job, capping downfall