Atlético Madrid have completed the signing of midfielder Conor Gallagher from Chelsea in a deal worth around €40 million ($44m).