Maj. Gen. Alfred Pleasonton, Officer of the Federal Army