legends of tomorrow season 3 finale air date