Inherent length scales of periodic mesoscale density structures in the solar wind over two solar cycles