add more builtin functions

1. change usage of submat from (x1,x2,y1,y2) to (x1,y1,x2,y2)
2. change the syntax of sum. add builtin functions: colsum, rowsum,
matsum, explicit saying the way of summation
3. add logdet
4. add submat, getrow, getcol, getrows, getcols