Glance registry protocol should be configurable

registry_client_protocol can't be configure in puppet now.
The default value is "http". It should be configurable.

Change-Id: I526c0892d123067362ea1b18cb8c21526a860981
Closes-bug: #1266988
Fix test regression: each statement isn't correctly used here.

Spotted by Michael on review #93111, The ruby "each" statement
run each test twice with the same parameters. This commit clean
tests.

This is a standalone commit because the original change 8156a87
was already reviewed/merged into master.

Change-Id: I16280d501bcfeb435326094043395013a1fd365a