The Red Sox may have prevailed in the World Series, but 2013 did not brim with confidence and optimism. Instead, the year’s headlines shocked and rattled residents from the South Shore and into Boston with news of a terrorist attack at the Boston Marathon, the torture of a dog in Quincy and a Congress that hit the federal government’s “off” button.