South Korea has passed a landmark bill to strip prosecutors of their investigative powers, a move the ruling party says it needed to prevent political abuse.