Integrated Systems management
Build a network of pay toilets where the waste was collected and processed in a biodigester on a farm. The biogas is used for food preparation and or electricity production. The nutrient rich effluent is then used as fertilizer for algae ponds. The algae is dried and fed to tilapia who are connected to a hydroponic system of vegetable production.
This urea powered fuel cell
http://crispgreen.com/2010/08/scientists-develop-urine-powered-fuel-cell/ Doesn't really solve the sanitation aspect but if the bathroom was also making power?