Analysis of HST/COS spectra of the bare C-O stellar core H1504+65 and a high-velocity twin in the Galactic halo