Nearly a quarter of working households in Massachusetts and across the United States spend more than half their income on housing, according to a study released yesterday by the Washington, D.C.-based Center for Housing Policy.