Ruleset updating mechanism to fetch, verify the authenticity of, and apply new ruleset databases

This pull request contains all of the commits I (Zack Mullaly) have made over the course of the Summer of 2014 to build a secure ruleset updating mechanism for my Google Summer of Code 2014 project.
There are still some details (such as a public key) that need to be filled in by whoever now is the primary maintainer of the project, but the feature should be functional once the TODOs are taken care of.
Adding a nonce to the name of the file wouldn't plug this hole because any malware targeting an HTTPS Everywhere user would just have to look for any sqlite file in the tmp directory. Putting the temporary file in the profile directory causes the same problem and I've been advised that putting files anywhere other than profileDir and tmpDir is a no-no.
I was considering just making the whole temporary file name random, including the extension, but then that's still easy to pick out with some file name analysis.
Even if we tried to mask the tmp DB file's existence by calling it something inconspicuous like "myphotograph[optional nonce].<gif/png/jpg>", malware could still just look for any file beginning with "myphotograph" or whatever we put there.
I'm not convinced this has a simple solution.