Allow to change executable (shell/interpreter) when using raw

This patch adds an optional 'executable=' option to the raw command line to override the default shell (/bin/sh), much like the shell module does.
Expands path on file operations

Path might have to be expanded on some operations. It seems that path
containing '~' are not.
Using os.path.expanduser in appropriate places solves the problem, but
this might be required in many other places.
Adds path expansion to two other methods

set_owner_if_different and set_group_if_different seems to need path
expansion too
Fix behaviour when file handles a path with tilde

Two problems here
* unchecked exception handling and erroneous assumption as to why
  an exception might fire
* although the file module expands the path, when using file_args
  the unexpanded path is passed.

Expected result: ~/path/to/file should work fine
Actual result: exception is because it doesn't find file with a message
about not being able to get the selinux context
add encoding documentation in postgresql_db
Merge pull request #1830 from willthames/fix_tilde_path_in_file

Fix behaviour when file handles a path with tilde
Merge pull request #1832 from legrostdg/devel

add encoding documentation in postgresql_db
Merge pull request #1821 from leucos/path-expand-fix

Expands path on file operations
Allow pattern[0] to address a single node

Replaces erroring out on it and requiring the abysmal pattern[0-0]
instead.
Merge pull request #1798 from dagwieers/raw-executable

Allow to change executable (shell/interpreter) when using raw
Extend executable= support in raw to include no execuable

Useful for managing not-UNIX things.
Document that task includes are now infinite depth
Resolve variable references inside variables

Fixes the case where variable x is '$y' and y is a dict(foo='bar') and
an attempt to access ${x.foo} is made.
Clean up imports (taken from PR #1804)
Merge pull request #1843 from dagwieers/import-cleanup

Clean up imports (taken from PR #1804)
Use re instead of shlex.split to find executable

shlex.split will strip quotes and it might not even be sh at this point.
Default to not using an executable

For compatibility with older releases as well as avoiding things like
action: raw executable= show status
to communicate with devices that don't have sh.
Revert #1818 but avoid double-dwim, fixing relative fileglob
reverted local.py change to eliminate conflict