HANNA: Hard-constraint Neural Network for Consistent Activity Coefficient Prediction