Tesla will lay off more than 10% of its global workforce, according to a memo sent to employees by CEO Elon Musk.