The suspected shooter, who had previously been accused of making online threats, surrendered after two school resource officers responded to the gunshots