Crystal Palace have confirmed the signing of Stoke City goalkeeper Jack Butland on a three-year deal on domestic transfer deadline day.