[WIP] DOC add links to github sourcecode in API reference

I enjoy using the API reference, but think a link to the source code github would often help.

Because `sphinx.ext.linkcode` does not provide the full path or line number of the class/function, I'm getting this stuff using grep, which relies on a unix shell and certain path structures, which is a bit not-nice. Since github needs a branch/commit reference, I'm using `git rev-parse --abbrev-ref HEAD` which can return a branch/tag name, but a more static commit reference (i.e. `rev-parse --short`) might be more sensible.

WDYT? ping @jaquesgrobler