Update salesforce.rb to be compatible with Rack 1.0.1 and Ruby 1.8.7

Hello,

I'm using omniauth-salesforce on an old Rails 2.3 project, running (unfortunately, for now) on Ruby 1.8.7 and Rack 1.0.1. Omniauth is compatible with Ruby 1.8.7, but there are two method calls in the Salesforce adapter that are incompatible.

* Base64.strict_encode64 is not available in Ruby 1.8.7 so I have reimplemented this as a private helper method.
* Rack::Request#user_agent is not available in Rack 1.0.1, so I have replaced it with a direct call to the HTTP_USER_AGENT key of the Rack env hash.

Please let me know if you have any questions! I know that these aren't the prettiest changes, but they are necessary for me to use this gem and may be helpful to others.. Thanks for all your work.

Ezra

p.s. I noticed that a number of specs are failing, both on my branch and on master. I haven't touched them but would be happy to look into the failures if you'd like.