After months of talks and at almost the last minute, Britain and the European Union struck a provisional free-trade agreement Thursday that should avert New Year chaos for cross-border traders and bring a measure of certainty for businesses after years of Brexit turmoil.