Added optimized module to topo based on Cython and C code

Optimized module is based on previous Weave C implementation,
which can now be eliminated, removing the heavyweight SciPy
dependency and paving the way for Python 3 compatibility.