Hierarchy of almost-periodic function spaces