Endocytic regulation of cellular ion homeostasis controls lysosome biogenesis