The Boston Globe plans to lay off 30 workers at its print facility in Taunton after losing a longstanding contract to print local copies of The New York Times.