Ion exchange nutrient recovery from anaerobic membrane bioreactor permeate