Fix possible possible key space exhaustion and overflow.

Each vertex is assigned a positive 32-bit integer as key, in a normal
situation it is very unlikely to exhaust the key space (2^31 - 1
possible keys), however, if the user creates manually a file with a
single vertex and 2147483647 as key, an overflow will occur the next
time a vertex is created in the program.

In this commit I rearrange the keys to get back to the original low
probability of exhaustion (still can happen that the user creates more
than 2^31-1 vertices).
Buttons for directed and undirected edges.

First attempt to distinguish between directed and undirected edges.