US court rules evidence on terrorism counts is ‘legally insufficient’ but murder trial could go ahead