Fix the order by problem in the sub-query, add perplexity, and fix the possible INT32 overflow problem

- Add ArrayType<int64_t> and MutableArrayType<int64_t> tpye trait
- Rewrite the core query for training and prediction to avoid using internal order by
- Change the type of model from INT4 to INT8
- Add perplexity function