Twitter to lay off 8 percent of workers