The former national security adviser is on the short list to be Joe Biden’s running mate. She has never been elected to public office, but in 2018 she took a close look at running for Senate — and at her own political strengths and vulnerabilities.