Use internalURL endpoint for commands during the chef run

This also contains the patch from https://github.com/crowbar/barclamp-glance/pull/112.