More effective from_global_array.

Avoid broadcasting of the global array if rank is not None.
Rearrange code to avoid gettting stucks sometimes.
Add routines inv and lu.

Additionally two test scripts.
Merge pull request #15 from zuoshifan/zuo/inv

Merge in LU and inverse routines.