US president’s national security adviser resigns over contacts with Russia