cloud/pubsub: use URL encoding to fix base64 encoding bug

Change-Id: I6da97353cf269a25c7e8521ba0da4ea061efc950