add correct handling of query params in server sync, fixes #388 and fixes #350

This fixes #388 and #350

This also fixes an issue with redundant params getting set as querystring params in ajax calls from clientSync.
e.g.  /issues/123?id=123
should probably add a test case for this to make sure it works w/ a ? and without. and a comment about why parse will get rid of the leading & in the normal case.