(#13659) Convert fact values to string when searching database

When querying inventory_facts we need to treat the fact value as a string,
since it's stored as text in the database. This causes an error to be raised
on postgres.
Fixup tests to work on CentOS 5

Several tests were failing because the depended on being able to find a
user provider. On CentOS 5 this didn't work because the provider that
should be used (the useradd provider) is not considered suitable when it
gets run as a non-privaleged user because the useradd and related
commands are not executable.

The user_spec.rb and group_spec.rb test didn't need the tests that were
failing because they were testing functionality that is already tested
by the Type base class's own tests.

The ral_spec.rb needed more mocking of the things it was using in order
to abstract it from the system on which it is running.

The resources_spec.rb got a small cleanup and was fixed by reordering
the data loading in Puppet::Type::Resources so that it doesn't load
information about a user until it needs to.

Conflicts:

	spec/unit/type/resources_spec.rb
Merge pull request #638 from zaphod42/bug/2.7.x/13655-test-failures-on-centos5

(#13655) test failures on centos5 on 2.7.x branch
[#13686] Fix directoryservices ShadowHashData code

Previously, Puppet wouldn't set a password if the ShadowHashData key was
missing from the User's plist.  This change will handle this situation,
create the key itself, and proceed with setting the password.
(#9167) Do not send email when nothing changes

Without this patch the tagmail report sends an email even when there are
no changes or resources out of sync. This has the undesired effect of
sending emails after every Puppet run.

When there are no changes or out of sync resources, tagmail logs a
notice stating the fact and skips processing logs and sending emails.

This patch includes new spec tests for the changes in behavior.
Merge remote-tracking branch 'kelseyhightower/kelseyhightower/ticket/2.7.x/9167_tagmail_report_sends_email_when_nothing_happens' into 2.7.x

* kelseyhightower/kelseyhightower/ticket/2.7.x/9167_tagmail_report_sends_email_when_nothing_happens:
  (#9167) Do not send email when nothing changes
Merge remote-tracking branch 'kelseyhightower/ticket/2.7.x/13637_rename_build_tree_to_format_tree' into 2.7.x

* kelseyhightower/ticket/2.7.x/13637_rename_build_tree_to_format_tree:
  (#13737) Swap build_tree and format_tree method names
Merge branch 'bug/2.7.x/13686_DS_Fix' into 2.7.x

* bug/2.7.x/13686_DS_Fix:
  [#13686] Fix directoryservices ShadowHashData code
Merge remote-tracking branch 'kelseyhightower/ticket/2.7.x/13639_use_puppet_logging_not_stderr' into 2.7.x

* kelseyhightower/ticket/2.7.x/13639_use_puppet_logging_not_stderr:
  (#13639) Don't send errors directly to stderr
Merge branch '2.7.x'

* 2.7.x:
  (#9167) Do not send email when nothing changes
  [#13686] Fix directoryservices ShadowHashData code
  Fixup tests to work on CentOS 5
  fix bug in Util#symbolizehash!
  (#13567) Fix create_resources name parameter bug
  (#13636) Update Module Face copyright date
  (#13737) Swap build_tree and format_tree method names
  (#9167) Do not send email when nothing changes
  Add Module Tool
  Make core changes needed for the puppet module tool
  (#13367) Patch SemVer to permit ranges including pre-release components.
  Monkey patch FileUtils.mv in Ruby 1.8.5
  (#1076) Show warning if an empty group is specified
  Maint: Remove unused mock objects in user spec
  Maint: Use real objects in user spec
  Maint: Add a real provider class to user spec
  Maint: Remove unused variable in user spec

Conflicts:
	lib/puppet/util/monkey_patches.rb
	spec/unit/type/resources_spec.rb
	spec/unit/type/user_spec.rb
Fix loading of faces in specs

Iterating over faces outside of a test causes problems because the run mode is
not set properly. Moving this inside of actual test cases allows the spec
helper to fake any necessary setup.

Changes due to Chris Price
(maint) Remove unnecessary step from puppet module build help

Without this patch the `puppet help module build` command says to make
sure the module directory is in the form of <username>-<modulename>.
This is an unnecessary step because it isn't actually necessary anymore.
It's a problem because we want to make things appear to be as simple as
they actually are, not more complex than they need to be.

I just tested this with a module existing at /vagrant/modules/jenkins
(no symlinks) using the command: `puppet module build .`

Everything worked out fine.  Puppet correctly reads the Modulefile and
figures out the author name.

This is a documentation only change.
Merge pull request #620 from kelseyhightower/kelseyhightower/ticket/2.7.x/3581_fork_that

(#3581) Stop forking around: Add fork helper method
Merge pull request #627 from kelseyhightower/ticket/2.7.x/13642_move_search_notice

(#13642) Move search notice message
Merge pull request #629 from kelseyhightower/ticket/2.7.x/13643_make_rm_rf_secure

(#13643) Make the use of FileUtils.rm_rf secure
Merge pull request #625 from kelseyhightower/ticket/2.7.x/13638_add_pre_funciton

(#13638) Add SemVer#pre function
Merge pull request #630 from kelseyhightower/ticket/2.7.x/13649_restrict_module_matching

(#13649) Restrict module name matching
Merge pull request #611 from pcarlisle/ticket/2.7.x/12101-reapply-autoload

Ticket/2.7.x/12101 reapply autoload
Merge pull request #649 from jeffmccune/maint/2.7.x/puppet_module_build_help

(maint) Remove unnecessary step from puppet module build help
Merge pull request #612 from zaphod42/refactor/remove-unused-fileserver

Removed unused code for FileServer