Early modern extraterritoriality, diplomacy, and the transition to capitalism