Huntington Beach and state reach settlement with plan for 502 low-income housing units