Maint: Fix typo in deprecation warning

The deprecation warning said to use a method that doesn't exist.
(maint) Pidlock#file_path uses correct instance var

Typo in Puppet::Util::Pidlock#file_path was referencing @lock_data which
doesn't exist.  This was resulting in messages like:

"Could not prepare for execution: undefined method `file_path' for
nil:NilClass"

instead of the slightly less confusing:

"Could not prepare for execution: Could not create PID file:
/home/jpartlow/.puppet/var/run/agent.pid"

From lib/puppet/daemon.rb:157 when attempting a second 'puppet agent'
call with existing daemonized agent.
(#20768) Don't confuse WMI and IADsUser automation objects

To enumerate local users (and groups), we execute a WMI query. The query
returns an array of generic WIN32OLE objects, each of which wraps an OLE
automation object. The WIN32OLE object uses method_missing to dispatch
method calls to the underlying automation object.

In the case of a WMI query for users, the underlying automation object
provides the methods and properties defined by the Win32_UserAccount
class[1], e.g.  AccountType, Caption, etc.

Previously, we were creating instances of Puppet::Util::ADSI::User and
passing in a WIN32OLE object wrapping the WMI automation object, when it
expects a WIN32OLE object wrapping an IADsUser[2] object.

This never caused a problem, because the windows ADSI user provider's
instances method only enumerates the user names on the systems and
creates new Puppet::Util::ADSI::User objects from them.

However, if you had ever called Puppet::Util::ADSI::User.each
programmatically, and then called a method that used the WIN32OLE
object, e.g. native_user.Get('HomeDirectory'), it would fail since the
WMI based automation object doesn't implement the 'Get' method.

This commit changes the 'User.each' method to not pass in a native_user
object. Instead, we create the correct native_user object lazily.

The same issue existed for 'Puppet::Util::ADSI::Group.each' as well.

[1] http://msdn.microsoft.com/en-us/library/windows/desktop/aa394507(v=vs.85).aspx
[2] http://msdn.microsoft.com/en-us/library/windows/desktop/aa746340(v=vs.85).aspx
(#20768) Only query on the name field

Previously, we loaded entire WMI objects from the query, assuming they
were needed by the ADSI objects. But this was incorrect and never
worked.

Since we only need the User and Group names, we can select only those
fields.
(#20768) Use the correct Win32API method signatures

In ruby 1.8, we could call CloseHandle passing it the handle (an opaque
unsigned integer value), and due to the 'P' in the method signature,
automatically arrayify and pack the handle. This wasn't done intentionally,
it just happened to work.

But ruby 1.9 no longer automatically coerces the parameter, instead
the CloseHandle method (implemented by the windows-pr gem) tries to pack
the handle, generating an error `can't convert Fixnum into String`. This
prevents puppet from managing a user's password and home directory.

The proper fix is to define the CloseHandle method signature correctly, so
that the windows-pr layer doesn't attempt to coerce the handle value.

The UnloadUserProfile API had a similar problem, it takes the handle as an
'L' input paramter (instead of a pointer).
(#20768) Enable managehome acceptance test on Windows

This commit enables the acceptance test on windows. On 2003, the default
home directory is C:\Documents and Settings\username. On Vista and
later, it is C:\Users\username. In the 2003 case, the home directory
needs to be quoted, e.g. when passed on the command line.
(#20768) Refactor base profile logic

This commit refactors the logic for figuring out the base profile
directory, e.g. C:\Users or C:\Documents and Settings, and updates the
acceptance test to use it. The `--helper` option must be used in the
systest harness so that the LOAD_PATH is setup correctly to find the
windows_utils.rb helper, but this should already be the case for
temp_file_utils.rb, etc.
(#20768) Windows can now create the home directory (again)

The previously pending_test method was used, because puppet couldn't
create the home directory when creating the user in ruby 1.9 on windows.
Now that that is resolved, we can remove the windows-specific
pending_test. Note, that the test will still be pending later, since
neither the windows nor useradd providers correctly move the user's home
directory.
Merge pull request #1680 'joshcooper/ticket/stable/20768-windows-managehome-redux' into stable

* joshcooper/ticket/stable/20768-windows-managehome-redux:
  (#20768) Windows can now create the home directory (again)
  (#20768) Refactor base profile logic
  (#20768) Enable managehome acceptance test on Windows
  (#20768) Use the correct Win32API method signatures
  (#20768) Only query on the name field
  (#20768) Don't confuse WMI and IADsUser automation objects
  Maint: Fix typo in deprecation warning

closes #1680
Merge branch 'stable'

* stable:
  (#20768) Windows can now create the home directory (again)
  (#20768) Refactor base profile logic
  (#20768) Enable managehome acceptance test on Windows
  (#20768) Use the correct Win32API method signatures
  (#20768) Only query on the name field
  (#20768) Don't confuse WMI and IADsUser automation objects
  Maint: Fix typo in deprecation warning
(#20967) Apply Redhat carried patch for rundir permissions

Since 2009 Redhat has been carrying a patch that modified the
permissions that puppet tried to enforce on the rundir from 01777 to
0755. This is a much more secure option and by taking this patch allows
packagers to use sane permissions for the rundir without patching
puppet.

See: https://bugzilla.redhat.com/show_bug.cgi?id=495096
(#20967) Fully manage ownership of rundir

When the change from 01777 to 0755 for rundir is applied, the puppet
master can get itself into a situation where it cannot properly write to
its rundir. This occurs when it creats the rundir as root and then later
tries to write the pidfile as the system (usually puppet) user. This is
solved by also making puppet try to manage the ownership of the rundir,
which also makes it consistent with what packages were creating and the
other directories that it tries to manage for the master.
Merge pull request #1679 from jpartlow/maint/pidlock-file-path-fix

(maint) Pidlock#file_path uses correct instance var
Merge pull request #1682 from zaphod42/issue/master/incorrect-management-of-rundir

(#20967) Apply Redhat carried patch for rundir permissions
Merge branch 'master' of https://github.com/puppetlabs/puppet