Use Ed25519 keys.

This uses the portable Ed25519 library made by Orson Peters, which in turn uses
the reference implementation made by Daniel J. Bernstein.

This implementation also allows Ed25519 keys to be used for key exchange, so
there is no need to add a separate implementation of Curve25519.
Properly initialize buffers.

Valgrind complained about use of uninitialized data.
Merge branch '1.1-ed25519' into 1.1
Use the ChaCha-Poly1305 cipher for the SPTPS protocol.

The main reason to switch from AES-256-GCM to ChaCha-Poly1305 is to remove a
dependency on OpenSSL, whose behaviour of the AES-256-GCM decryption function
changes between versions. The source code for ChaCha-Pol1305 is small and in
the public domain, and can therefore be easily included in tinc itself.
Moreover, it is very fast even without using any optimized assembler, easily
outperforming AES-256-GCM on platforms that don't have special AES instructions
in hardware.
sptps_test: allow using a tun device instead of stdio.
Put brackets around IPv6 addresses in invitation URL, even if there is no port number.
Fix typo in comment
Nexthop calculation should always use the shortest path.

When tinc runs the graph algorithms and updates the nexthop and via pointers,
it uses a breadth-first search, but it can sometimes revisit nodes that have
already been visited if the previous path is marked as being indirect, and
there is a longer path that is "direct". The via pointer should be updated in
this case, because this points to the closest hop to the destination that can
be reached directly. However, the nexthop pointer should not be updated.

This fixes a bug where there could potentially be a routing loop if a node in
the graph has an edge with the indirect flag set, and some other edge without
that flag, the indirect edge is part of the minimum spanning tree, and a
broadcast packet is being sent.
Fix compiler warnings.
Change AutoConnect from int to bool.

The proper value is 3, not 2 or 4, and 5 is right out. So just hardcode this value,
and only have the option to turn AutoConnect on or off.
Use void pointers to opaque buffers.
Add missing closedir().
Fix a crash when we have a malformed public ECDSA key of another node.
Fix PMTU discovery via datagram SPTPS.

In send_sptps_data(), the len variable contains the length of the whole
datagram that needs to be sent to the peer, including the overhead from SPTPS
itself.
Add sanity checks when generating new RSA keys.

The key size should be a multiple of 8 bits, and it should be between 1024 and
8192 bits.
Rename ECDSA to Ed25519.
Implement a PEM-like format for Ed25519 keys.

We don't require compatibility with any other software, but we do want Ed25519 keys to work
the same as RSA keys for now.
Allow Cipher and Digest "none".

This is for backwards compatibility with tinc 1.0, it has no effect on
the SPTPS protocol.
Fix base64 decoding of Ed25519 keys.
Return non-zero exit code when "tinc get" does not find the requested variable.