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 #6155 Inject checkmode into synchronize module args
Fix synchronize unit test to handle checkmode
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.
Micro-optimization of inventory.expand_hosts.detect_range
Micro-optimization: replace s.find(x)!=-1 with x in s

timeit shows a speedup of ~3x on Python 2.7.5 x86_64.
It also makes the code a bit shorter.
hostname module: don't filter hostnamectl with awk

There's no need to filter hostnamectl's output with awk because its man
page says:

    hostnamectl [OPTIONS...] {COMMAND}

       --static, --transient, --pretty
	   If status is used (or no explicit command is given) and one
	   of those fields is given, hostnamectl will print out just
           this selected hostname.

E.g. hostnamectl --static status => ansible.example.org