Leicester City have signed Birmingham City winger Demarai Gray after meeting a £3.7m release clause in his contract.