Anaerobic Membrane Bioreactors for Nonpotable Water Reuse and Energy Recovery