A growing number of companies are tapping technologies such as artificial intelligence and augmented reality to stay ahead in the lucrative but competitive beauty market.