Man accused of attacking St. Louis County officer, being shot charged