SOMERVILLE, Mass. — When they filled out the city’s census forms this spring, the people of Somerville got a new question. On a scale of 1 to 10, they were asked, “How happy do you feel right now?”