Dkim, with updates against smf's

So, I wanted to open a PR against @smfreegard's branch with DKIM in it, and then discovered that his PR #695 was against a version of smfreegard/master that no longer exists. So I couldn't.

This is the next best thing, which incorporates all of Steve's commits that are in the PR, as well as the additions made per jshint and @baudehlo comments.