Chinese police have released on bail a woman who became an unwilling hero to tens of thousands of compatriots after stabbing to death an official who she said tried to rape her when she rejected his advances .