Author tells jury the knife came "a millimeter from my brain" as he testifies against convicted attacker Hadi Matar.