(PUP-2984) Remove x64 Program Files Path

If you install Puppet x86 after installing Puppet x64 and leave everything to
the default locations, Windows File System Redirection will cause the installer
to not remove the old files in Program Files and worse, not update the PATH
environment variable. The x64 bit PATH gets a higher priority, so you would be
using the older Puppet when called from the command line. This can cause
inconsistent results when using Puppet. The behavior only happens when dealing
with `Program Files` versus `Program Files (x86)`.

This adds two custom actions to clean up the left over files and update the path
accordingly. This is only done during install of the x86 installer when on a
64bit operating system when the state is to add the feature. The functionality
is not in the x64 installer at all, and will not attempt to call these actions
when upgrading x86 packages with this behavior included.

If for some reason either of these two actions should fail the installer will
not fail as a result. The cleanup of the files should work on almost any system
as the command uses very old technology. The update of the PATH environment
variable uses PowerShell so it has the most chance of failing if PowerShell
execution is disabled due to security policy on the machine. However if the
PATH doesn't get updated, the surface of inconsistent behavior is removed due
to the files being cleaned up.
(PUP-2984) Remember x86 / x64 custom install dirs

 - Our current installation strategy allows for upgrades / downgrades /
   sidegrades of any Puppet versions, across any architecture.  The
   installer has always tracked the custom installation directory
   through a registry key.  However, in order to properly track this
   key across both the 32-bit installer (where the default installation
   location is C:\Program Files (x86)\) and the 64-bit installer (where
   the default installation location is C:\Program Files\), it was
   initially determined that the keys should be segregated with the
   Win64 attribute on the Component.  This allows the 32-bit installer
   to continue to store the RememberedInstallDir in the Wow6432Node
   key in the registry, and the 64-bit installer to continue to store
   RememberedInstallDir under the native 64-bit key in the registry.
 - However there were certain installation sequences that would
   prevent a custom installation directory from being remembered
   properly.  For instance, if installing Puppet 3.6.2 x86, the
   invoking the Puppet 3.7.0 x64 installer, the RememberedInstallDir
   registry key under the Wow6432Node would actually be deleted.  If
   the user then attempted to install Puppet 3.7.0 x86, the custom
   directory that they used previously (which might contain local
   file installations / changes) would not be properly remembered in
   the GUI like it had been previously.
 - The workaround for this is a bit complex as it requires adding a new
   RememberedInstallDir64 registry key under the 32-bit registry that
   separately tracks the custom install path for a 64-bit install. This
   ends up being a little tricky because:
    - The INSTALLDIR property should default to using the appropriate
      registry key based on whether the installer is 32-bit or 64-bit,
      which necessitates the RememberedInstallDirRegKey variable.
    - The registry keys need to be treated differently whether the
      installer is 32-bit or 64-bit.  For the 64-bit installer, the
      32-bit custom path should remain unaltered in the registry and
      should not be removed.  The same holds true in reverse.
    - The INSTALLDIR_X86 property was added so that an x64 installer
      can capture the value of RememberedInstallDir during an
      uninstall, and properly remember it going forward.  This is only
      necessary to create because this reigstry key is not set as
      Permanent in prior installers.  An INSTALLDIR_X64 is not needed
      because the RememberedInstallDir64 reg key will have always
      been marked permanent (furthermore, it doesn't actually work
      properly when used in a 32-bit installer because
      WIN64DUALFOLDERS will perform automatic string substitution,
      mangling a path that contains Program Files)
    - The registry keys are marked as permanent so that in a 3.7 x64
      to 3.6 x86 downgrade scenario the custom install path is not
      forgotten for any future x64 installs.

The following scenarios have been tested with these changes in place:

3.7 x86 straight install
 - RememberedInstallDir is custom
 - RememberedInstallDir64 is not present
3.7 x86 -> 3.7 x64
  - RememberedInstallDir is custom
  - RememberedInstallDir64 is custom
3.7 x86 -> 3.7 x64 -> 3.7 x86
  - RememberedInstallDir is custom
  - RememberedInstallDir64 is custom
3.7 x86 -> 3.7 x64 -> 3.7 x86 -> 3.7 x64
  - RememberedInstallDir is custom
  - RememberedInstallDir64 is custom
3.7 x64 straight install
  - RememberedInstallDir is empty
  - RememberedInstallDir64 is custom
3.7 x64 -> 3.7 x86
  - RememberedInstallDir is custom
  - RememberedInstallDir64 is custom
3.7 x64 -> 3.7 x86 -> 3.7 x64
  - RememberedInstallDir is custom
  - RememberedInstallDir64 is custom
3.7 x64 -> 3.7 x86 -> 3.7 x64 -> 3.7 x86
  - RememberedInstallDir is custom
  - RememberedInstallDir64 is custom
3.6.2 -> 3.7 x86 upgrade
  - RememberedInstallDir is custom
  - RememberedInstallDir64 is not present
3.6.2 -> 3.7 x86 upgrade -> 3.6.2 downgrade
  - RememberedInstallDir is custom
  - RememberedInstallDir64 is not present
3.6.2 -> 3.7 x86 upgrade -> 3.7 x64
  - RememberedInstallDir is custom
  - RememberedInstallDir64 is custom
3.6.2 -> 3.7 x86 upgrade -> 3.7 x64 -> 3.6.2 downgrade
  - RememberedInstallDir is custom
  - RememberedInstallDir64 is custom
  ** Custom x64 installation folder is still full of files
3.6.2 -> 3.7 x86 upgrade -> 3.7 x64 -> 3.6.2 downgrade -> uninstall
  - RememberedInstallDir is not present
  - RememberedInstallDir64 is custom
  ** Custom x64 installation folder is still full of files
3.6.2 -> 3.7 x64 upgrade
  - RememberedInstallDir is custom
  - RememberedInstallDir64 is custom
3.6.2 -> 3.7 x64 upgrade -> 3.6.2 downgrade
  - RememberedInstallDir is custom
  - RememberedInstallDir64 is custom
  ** Custom x64 installation folder is still full of files
3.6.2 -> 3.7 x64 upgrade -> 3.7 x86
  - RememberedInstallDir is custom
  - RememberedInstallDir64 is custom
3.6.2 -> 3.7 x64 upgrade -> 3.7 x86 -> 3.6.2 downgrade
  - RememberedInstallDir is custom
  - RememberedInstallDir64 is custom
3.6.2 -> 3.7 x64 upgrade -> 3.7 x86 -> 3.6.2 downgrade -> uninstall
  - RememberedInstallDir is not present
  - RememberedInstallDir64 is custom
Merge pull request #76 from Iristyle/ticket/master/PUP-2984-remove-x64-programfiles

(PUP-2984) Remove x64 Program Files Path