We waste millions of tonnes of bread every year. New research shows how it could be turned into something delicious.