How do set an angular velocity to zero with python bge?
It is not a bug. It is a feature ;).

Sometimes it is an annoying feature. 

I tried various methods to get zero velocity.

A) parent/unparent ... restores the previous velocity.

B) disable/enable physics ... restores the previous velocity.

C) I found one (not so nice) way by experimenting:

def stop(owner):
    owner.setLinearVelocity([0,0,1])
    force = [0,0,-50.174276 * owner.mass]
    owner.applyForce(force)


It shows zero velocity with even 24 digits. I can't tell if that is really the case, but it looks like that. 

Be aware, this velocity appears within the next frame as apply frame will not effect the object immediately (0,0,1) at frame t and (0,0,0) at frame t+1. Be aware this force counters gravity (9,8) for this one frame too.



[edit]
With taking gravity into account I get this:

def stop(owner):
    owner.setLinearVelocity([0,0,1])
    gravity = owner.scene.gravity
    force = -gravity.copy()
    force.z = (-59.974275 - (gravity.z)) * owner.mass
    owner.applyForce(force)


The frame rate has some influence too (I would expect -60 not -59.974275). But I can't find a formula on that.

Maybe it helps