Convert hash values to string for digest, and allow different digest methods to be used

Sending a hash with an integer value caused CGI.escape to choke as it is expecting a string. I find by default that passing a hash with { 'uniqueid' => current_user.id } feels natural. So I've applied a fix for that.

On the Vanilla Forums site, it says that it is recommended to use SHA1 as digest, however MD5 was hardcoded, so I am applying a fix for that as well. So now MD5 is on by default (for backward compatibility), but allows any digest to be used. 

I've included some rspec test for the updates.

Thanks, Marcus