Path has been cleared for triumph in Friday's vote of judiciary chief who oversaw executions of thousands, as Supreme Leader consolidates power and prepares his legacy