Five world powers and Iran agree to set up legal entity to circumvent US sanctions after Trump pullout from 2015 deal.