refactor paginate helper to deal with many query strings
refactor paginate helper to deal with many query strings

the new implementation is based on krishnaprasad's pastie - http://pastie.org/1192729
from http://www.railsmine.net/2010/08/active-record-and-will-paginate-for-non.html?showComment=1285908799841#c1665701548706131371

kuntoaji/sinatrails,kuntoaji/sinatrails