Remove self loops in RAG

- Removes self loops in RAG
- Handles NCut case where self loops are required

This will result in much cleaner code, as seen in #1100
I don't like this approach very much, but I will go with whichever is faster between this and the following:

```python
current = values[0]
neighbors = values[values != current]
for neighbor in neighbors:
    graph.add_edge(current, neighbor)
```

What do you think?