Quark-hadron duality in spin structure functions g(1)p and g(1)d