gandalf in star trek