UK and Ireland agree on residency for citizens post-Brexit