the republic of ireland gained independence from britain