London and capital cities across Europe have been warned about the possibility of a shooting or bomb attack on or before New Year's Eve.