refactor to catch edge cases, remove repeated code

- Move all the supported YAML file extensions into a constant
- Use helper functions to avoid duplicate code for group/host vars
- Catch and disallow some confusing situations, such as the presence of
  multiple group/host vars files for the same group/host, but with
  different extensions.  For example having both group_vars/all.yml and
  group_vars/all.yaml.
- Catch and report file system permission issues, symlink errors,
  unexpected file system objects
- Trivial performance improvement from making fewer stat system calls
- Restructuring that makes it easy for a following patch to support
  directory recursion
Allow organizing host/group vars in a directory

So instead of having:
 group_vars/production.yml

A user could chose to reorganize to:
 group_vars/production/staff.yml
 group_vars/production/networks.yml
 group_vars/production/dns.yml

(Backwards compatible.)
Add support for bare git reference repos

This adds two parameters to the git module:

  bare (boolean)
    Indicates this is to be a bare repositori

  reference (string)
    Indicates the path or url to the reference repo.
    Check out the "--reference" option in the "git clone"
    man page

Added appropriate tests.
Merge pull request #4691 from cg-soft/git-bare-ref-repo-support

Add support for bare git reference repos
Fix git bare test in el6 by adding origin to remote
Fix copyright section in githooks module
Merge pull request #4758 from alanfairless/group-host-var-dirs

Support organizing group and host variables across multiple files in a directory
Allow name or human_id for 'image', IDs can change, name or human_id is recommended
Update DOCUMENTATION to reference correct env var, and add URL for more info
Don't count servers not in ACTIVE status as a match
Give more info rather than building a small set by using server._info
Add the ability to wait for status or networks

The networks attr isn't available immediately but before
status == ACTIVE. In some cases this may be all you need
Simplify networks logic and add a few comments
Update Env var reference to use the correct name
Deprecate the 'service' attribute
Extend the OK statuses

This ensures we only find machines that are not in proper states
Provide all details about the instance, or at least more than before
No need to perform a server.get() wait_until updates this for us
Formatting change
Standardize on quotes where applicable