UK tech firms attract record £5.5bn in foreign investment