Closing the era of one chief executive and entering another under temporary leadership, Twitter exceeded investor expectations on Tuesday, reporting a 61 percent increase in revenue and a smaller loss than a year ago. However, the company, which has struggled to attract new users, said that the number of people using its social network rose by only 2 million over the past three months, to 304 million.