Rift as EU leaders reach deal on refugee relocation