Transitive closure C extension

@mwylde
Referring to lines like this
```
dist[size*i+j]
```