President Barack Obama described the mass shooting in California as an “act of terrorism” in an address to the nation four days after the carnage left 14 dead.