The UK and the EU have agreed a new post-Brexit "reset" trade deal after months of negotiations.