Make sure requested version tag gets downloaded

There is a subtle bug in how the git module currently works. If the
version you request is a tag name, and you've already got the repo
cloned, and the tag name is a new tag, but refers to the already checked
out working copy, the git module would exit early without change. This
is bad as it means the new tag ref was not fetched and could not be used
in later tasks.

This change will check if the version is a remote tag, and if the tag
doesn't exist locally. If that is true, it'll do a fetch.

The activity could still be seen as not a change, because the working
copy won't be updated, if the new tag refers to the already checked out
copy, but that's not different than before and can be fixed as a more
comprehensive overhaul of tracking change in the git module.
Fixes #6161 Get the delegate host info properly from the hostvars object
lookup_plugins: loop over hashes

Create a lookup plugin named dict that can be used to loop over hashes.
It converts a dict into a list of key-value pairs, with attributes named
"key" and "value."  Also adds a brief explanation and simple example to
the docs.

Signed-off-by: Kent R. Spillner <kspillner@acm.org>
Merge pull request #5964 from sl4mmy/with-dict

lookup_plugins: loop over hashes

Tests good with the global variables:
```
users:
  alice:
    name: Alice
    id: 12345
  luna:
    name: Luna
    id: 23456
```

and playbook tasks:
```
- name: Print records.
  debug: msg="User {{ item.key }} is {{ item.value.name }}  {{ item.value.id }}"
  with_dict: users
```
Fixing the unicode issue in uri for EL6 platforms

Fixes #5869
Merge branch 'git_version_tags' of https://github.com/j2sol/ansible into j2sol-git_version_tags
Fix fails on ubuntu due to missing /etc/motd

Some systems that we are testing on may not have /etc/motd. So we need to create a file that we can control and use that for the further tests.
Merge pull request #6165 from risaacson/fix_fetch_integration

Fix fails on ubuntu due to missing /etc/motd

Tests functional on centos6, ubuntu1204 and ubuntu1310 now.
Fixes #5255 yum: set disabled repos before enabled repos and fix the parameters used
Rename flatten funciton.

flatten(x) is used a lot in the various lookup plugins where in each it is slightly different. This is to make this name slightly more unique.
Merge pull request #6166 from risaacson/rename_flatten_in_dict

Rename flatten function.
Fix setup module to gather facts from PowerPC Macs.
Merge pull request #6172 from cchurch/devel

Fix setup module to gather facts from PowerPC Macs.