AMENDED AND RESTATED AGREEMENT AND DECLARATION OF TRUST OF DREYFUS INVESTMENT FUNDS