Add fix for inheritance problem.

Add an extra argument for the add_subgraph method that allows one to
define which class will be used for the new subgraph. If no class is
given it assumes same as self.
Revert "Add fix for inheritance problem."

This reverts commit c437462db717bdf4f9f4098b3ad7ea185de74967.
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.
Add tests for edges.
Merge branch 'edges'