As a former state attorney general, Senator Kamala D. Harris, the Democratic nominee for vice president, has received significant scrutiny of her record on law enforcement, facing questions and criticism about uneven prosecutions of killings by police officers.