Abe praised the steps ancestors took toward reinventing Japan and likened their “brave” fight against the rise of the West to current challenges, including a rapidly shrinking population.