Development and optimization of an innovative three-stage bioprocess for converting food wastes to hydrogen and methane