Electroosmotic and pressure-driven flow in open and packed capillaries: velocity distributions and fluid dispersion