add lreg example.
change test_lreg to use code im example.linear_regression
Merge pull request #31 from EasonLiao/lreg_example

add linear regression example and use code of it in test
add ndim property for distribute array
add ndim to both Expr and DistArray
Merge pull request #34 from EasonLiao/add_ndim

add ndim to both Expr and DistArray
Migrate extent.py to extent.pyx
  - Replace some tuples (ul, lr) with C arrays.
  - Replace some tuple operations with loops.
  - Merge slicing.pyx to extent.pyx