Line graph algorithm doesn't handle self-loops correctly

The algorithm in line_graph() doesn't capture self-loops correctly.
See the discussion and code examples at 
http://stackoverflow.com/questions/18214305/correctness-of-networkx-line-digraph-construction/18244242