Add a link method to Thread

This will allow users to link their own callback functions to a
greenthread.

Change-Id: Ie2086e79ffdb75a4bd041ad919a2d0148fbcde6d
Merge "Add a link method to Thread"