The world's largest social media companies have been accused of creating "addiction machines" as a landmark trial began in California examining the mental health effects of Instagram and YouTube.