fix 404 errors due to trailing '/' in some urls

 - added a required content-type header for creating/updating images

Former commit msg:
-----------------
(UNNECESSARY) modified auth routine to return token id in short-form

  - on a vanilla devstack, `POST /tokens` for authentication returns a
  token object with a base64 encoded id
  - curling glance with the base64 token id returns a 404 status
    code(INCORRECT)
-----------------

Change-Id: Ic01fa23d3d5b0021b3c099da76ce82c0331fd5a1
Merge branch 'v1_client_fix' into local-master
all fixed

Change-Id: Ib29f4bc3cf0bf8f65eb337f4002b5df65f18e996