Prosecutor: Attacker yelled 'Allahu akbar' multiple times during assault, had psychiatric history; police say books on Islam were found in his bag