Residents can return to more than 8,000 homes evacuated after gas blasts and fires near Boston.