Refactor ssl check

I've refactored the ssl check to mimic Rack::Request#ssl? behavior as stated in #663. I've removed the query = nil assigment too since it looked redundant just after the gsub and added a few test for a custom full_host that were not provided before.