Allow larger number of neighbors in watts_strogatz_graph and newman_watts_strogatz_graph

previously the code

import networkx as nx
nx.watts_strogatz_graph(10,6,0.0)

would give the following error:

networkx.exception.NetworkXError: k>=n/2, choose smaller k or larger n

However, it should yield a ring network, with every node attached to 6
neighbors.

In order to obtain this, we now also need to check that we only rewire
an edge starting at a node, if the degree of that node is less than
n-1.  This avoids an infinite loop in the rewiring algorithm.