Twitter will be laying off a number of its workers as part of an overall restructuring of the social networking company. In a filing with the US Securities and Exchange Commission, it said that it plans to lay off up to 336 team members, or about 8 percent of its total work force.