Fix: Pull checkpoints weren't getting restored correctly

TDPuller was saving its checkpoints to the remote JSON doc as numbers but
they were then read back and cast to string, causing the comparison to
fail. This meant the puller would start over from the beginning every time.

I also added some more logging.

Conflicts:
	Source/CBL_Pusher.m
	Source/CBL_Replicator.m
Fix: "?" in doc ID wasn't being escaped

TDEscapeID wasn't escaping "?". This led to the replicator constructing
invalid URLs for docs whose ID contains "?", which meant they'd never get
replicated.
Fix: Puller would lose checkpoint if first doc couldn't be pulled

If the first new revision received by the puller fails to be read or
written, the last-sequence ID won't advance. But the puller was instead
getting a null sequence ID instead of the checkpointed one, and trying
to save that, which deleted the checkpoint. So the next pull would start
over from the beginning.

Conflicts:
	Source/CBL_Puller.m