Fixed bug in is_fan function

The distance_matrix function gives no guarantee that the ith entry corrsesponds to the ith vertex.
Optimised is_fan function.

No need to store the values in the list L: we can check the condition on the fly.

Old version:
sage: %timeit is_fan(c5chord)
100 loops, best of 3: 13.5 ms per loop

New version:
sage: %timeit is_fan(c5chord)
100 loops, best of 3: 7.82 ms per loop