Add generic edges_iter.

It won't consider orientation of edge. To achieve this functionality,
the iterator goes through the out edges first, then the in-edges. If the
nbunch is a group, an auxiliar set is used to avoid repetitions.
Add fix for edges from a node to the same.