Militants kill three Pakistani police in ambush