[branch-0.9] Fix github links in docs

We moved example code in v1.0. The links are no longer valid if still pointing to `tree/master`.

Author: Xiangrui Meng <meng@databricks.com>

Closes #1456 from mengxr/links-0.9 and squashes the following commits:

b7b9260 [Xiangrui Meng] change tree/master to tree/branch-0.9 in docs