Refactored Request#hash_to_query_string for clarity and speed

This is faster in the both the empty hash and hash with elements paths. I think it's also a bit more clear.