More flexible generic weighted projection. Addresses #732

As pointed out in #732, the generic weighted bipartite projection function would be a lot more flexible if its  `weight_function`  could accept two nodes instead/in addition of their two neighbourhoods. As a starting point, this pull requests implements the "instead" approach and thus is backwards incompatible. I think that this way the code is clearer and it is easier to write custom `weight_function`, but I'm not sure of the impact of the change in users code.  Also, updated docs with examples and a new test.