The European Investment Bank said on Thursday it would stop funding fossil fuel projects at the end of 2021, a landmark decision that potentially deals a blow to billions of dollars of gas projects in the pipeline.