Vertex functions at finite momentum: Application to antiferromagnetic quantum criticality