With a reputation for quality, foreign brands dominate Chinese technology markets. But in 2014, homegrown Xiaomi overtook Samsung and Apple to become the biggest smartphone manufacturer in China. How did a Chinese company manage to build enough prestige to compete with the big boys?