Habit Formation, Interdependent Preferences and Demographic Effects in the Almost Ideal Demand System