Iran detained the British-flagged Stena Impero tanker after Gibraltar refused to release its own tanker accused of shipping oil to Syria.