Optimism for the EU's future has slumped among Europeans, despite more than half still saying that they feel hopeful.