For a quarter century, President Vladimir Putin faced the specter of Russia's shrinking and aging population.