Newly promoted Burnley sign goalkeeper James Trafford from Manchester City in a four-year deal worth up to £19m.