Some small DHT CPU optimizations.

Only compute the shared key once instead of twice for received DHT
requests/responses.