Refactor Hash#to_param method

Here are some changes that I made which simplify hash#to_param method:   
  * extract some helper methods
  * simplify hash param normalization

It's worth to point out that #normalize_param api has slightly changed - the returned string doesn't have trailing '&' anymore. On the other hand it feels like it should be a private method anyway.