des.c: Add support for two-key Triple-DES

Add two-key 3DES support, needed by pycrypto.

This commit is based on the one for the bundled libtomcrypt 1.16
code in pycrypto:

https://github.com/dlitz/pycrypto/commit/65085f16