Gait speed in mid-life indicates how fast the brain and body are ageing, researchers found.