Tech giant's market value drops below $4 trillion after Huang steps down following espionage and affair allegations.