Fix bug in average weighted connectivity for digraphs when using in-degree.

Fixes #627.
Add test.
Merge pull request #818 from hagberg/627-connectivity

Fix bug in average weighted connectivity for when using in-degree.  Fixes #627