Beam-based characterization of plasma density in a capillary-discharge waveguide