Electrodialysis and nitrate reduction (EDNR) to enable distributed ammonia manufacturing from wastewaters