Disconnected zigzag carbon nanotube as spin valve and spin filter predicted by first-principles study