Cutting machine for three-dimensional cutting of foodstuffs