Encode ID used in REST endpoint URL

The Gerrit documentation says following:

  "All IDs that appear in the URL of a REST call (e.g. project name,
  group name) must be URL encoded."

As this wasn't done, project where the name was something
like "parent/project" didn't get messages from Gerrit.

The branch name can also have characters that must be encoded.
Use constant instead of magic string

Use org.apache.commons.lang.CharEncoding.UTF_8 as
encoding instead of "UTF-8" -string.
Merge pull request #111 from jyrkiput/change-id-encoding

Encode ID used in REST endpoint URL