Period variations in pulsating X-ray sources. I - Accretion flow parameters and neutron star structure from timing observations