Thousands of US schools were shut down by fake threats involving bombs, allege prosecutors.