The United Kingdom and the European Union have agreed a deal that will give London’s vast financial center a basic level of access to the bloc’s markets after Brexit.