Improve query string handling.

* Add objectToQuery and queryToObject.
* Start replacing fragile URL query string manipulation with those functions
* Fix specs that incorrectly depended on exact URL string equality, and other spec cleanup.
Fix doc typos
remove Specs/getQueryParameters which is no longer needed
Avoid defaultValue when the default value is a new object.
Updates based on review.

* Throw when required args are undefined.
* Concat strings instead of using a scratch array.
Merge pull request #2171 from AnalyticalGraphicsInc/queryStringParsing

Improve query string handling.