Use `CGI.escape` instead of `URI.escape` in tests

The test were building up some queries that contained timestamps,
and inserting the iso8601 timestamps into the URLs using
`URI.escape`.  However, that method does not do any escaping for the
plus (`+`) character, so when we hit a timestamp with a positive
timezone offset, the `+` character was being included as-is in the
query string.

On the server side, the `+` would then be decoded into a space
before processing, which resulted in the timestamp no longer
conforming to ISO8601.

This commit simply switches us over to use `CGI.escape` instead,
which should cause the `+` to come out intact on the server
side.