better var names and keeping property name into variables instead of using so much array index notations.
tests considering special chars and  arrays with empty values.
Merge branch 'qs-encode'
jslint friendly
regex to replace trailing property name fixed, and test updated