Application of an ultrafast photonic technique to study polarization switching dynamics of thin-film ferroelectric capacitors