custom PullToRefresh

1. stop refreshing when network down
2. stop refreshing when navigate to another directory.
3. refactor code in order to remove the dependent external library.