Add tsort

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>

----

Another test project is here

https://github.com/akiradeveloper/rust-tsort

## Testing
It generates random graph and compares both outputs of GNU-version and Rust-version. I think Rust-version works correctly.

## Performance
The current version doesn't perform well for especially large scale dataset.

Here is a experimental result from the above test project.

The test is first create DAG of N nodes and N(N-1)/2 edges and then feed the dataset into both versions. Note, t_new is of Rust-version and t_ref is of GNU-version.

N increases from top to bottom as logarithmic scale (10, 20, 50, 100, 200, 500, 1000, 2000, 5000). When the N is small. Rust-version is not bad however, it loses more the higher the N is. At the last case, it's 10 times worse.

The algorithm is O(|V|+|E|) which is O(|V|^2) in this case. I will improve the algorithm if I find better one.

```
TEST30000 result: OK, acyclic:true, time: t_new/t_ref=0.008438441/0.006900673
TEST30001 result: OK, acyclic:true, time: t_new/t_ref=0.009235107/0.006930367
TEST30002 result: OK, acyclic:true, time: t_new/t_ref=0.009223152/0.007113545
TEST30003 result: OK, acyclic:true, time: t_new/t_ref=0.013038735/0.007669914
TEST30004 result: OK, acyclic:true, time: t_new/t_ref=0.034065732/0.011519491
TEST30005 result: OK, acyclic:true, time: t_new/t_ref=0.186134332/0.03995111
TEST30006 result: OK, acyclic:true, time: t_new/t_ref=0.862109813/0.149578491
TEST30007 result: OK, acyclic:true, time: t_new/t_ref=4.584371179/0.62385227
TEST30008 result: OK, acyclic:true, time: t_new/t_ref=42.988573293/4.288322895
```
Applied this change but some regression test turn into failure. I suppose this change is not just a refactoring but changing the algorithm itself.

```rust
-            while !n_out_edges.is_empty() {
-                // n -> m
-                let m = (*n_out_edges)[0].clone();
-                n_out_edges.remove(0);
-
-                let m_in_edges = self.in_edges.find_mut(&m).unwrap();
+            // while !n_out_edges.is_empty() {
+            //     // n -> m
+            //     let m = (*n_out_edges)[0].clone();
+            //     n_out_edges.remove(0);
+            //
+            //     let m_in_edges = self.in_edges.find_mut(&m).unwrap();
+            //     m_in_edges.remove(&n);
+            //
+            //     // If m doesn't have other in-coming edges add it to start_nodes
+            //     if m_in_edges.is_empty() {
+            //         start_nodes.push(m);
+            //     }
+            // }
+            //
+            for m in n_out_edges.iter() {
+                let m_in_edges = self.in_edges.find_mut(m).unwrap();
                 m_in_edges.remove(&n);
-
+
                 // If m doesn't have other in-coming edges add it to start_nodes
                 if m_in_edges.is_empty() {
-                    start_nodes.push(m);
+                    start_nodes.push(m.clone());
                 }
             }
+            n_out_edges.clear();
```