Respiratory tract infections in young children are linked to an increased risk of asthma and worse lung function in later life, according to new research.