(maint) Make sqlite3 use an in-memory DB for specs

Without this patch the spec tests are configuring sqlite in a manner
that writes the database to a file named ':memory'.  This is a problem
because filesystem databases are slower than in-memory databases and the
tests are not cleaning up this file after completing.

The change in 60e78b2d36f23877dc7b50e72578ad123d62c1f0 caused this
change in behavior, likely by accident, because the database connection
string was ':memory:' and the patch changed the string to ':memory'
likely because this looks like a Ruby symbol.

This patch addresses the problem by restoring the original connection
string of ':memory:'
(#16568) Warn when TypeCollection skips missing objects

Commit 242692e optimized the `TypeCollection` by having it track missing
objects and then skip searching for those objects during subsequent
compilations. The problem is that this behavior was not logged which led many
users to wonder why classes and definitions would repeatedly come up as missing
until the puppet master was restarted (ref [#16568][16568]).

[16568]: https://projects.puppetlabs.com/issues/16568
(#16568) Try to load missing types by default

This patch adds a new setting `:ignoremissingtypes` that controls the
optimization introduced in 242692e. This setting defaults to `false` as the
behavior of this optimization is likely to confuse those who don't need it.
Merge branch 'Sharpie-16568-make-typecollection-optimization-optional' into stable

* Sharpie-16568-make-typecollection-optimization-optional:
  (#16568) Try to load missing types by default
  (#16568) Warn when TypeCollection skips missing objects

closes #1616
(#20421) Use systemd as default service on arch

Per https://www.archlinux.org/news/end-of-initscripts-support/ Arch
Linux has migrated to systemd and as of January 2013 has dropped support
for sysv style init scripts. GH-1468 updated the systemctl binary
location which made the systemd service provider functional on Arch, but
since there was no clear default between init and systemd, init won out
which effectively broke systemd init scripts.

This commit sets systemd as the default for Arch Linux, and makes the
sysvinit scripts available as a fallback option. Since the init provider
is still functional and can be delegated to if there is no systemd
service for a given system service.

Squashed into a single commit and commit message update by Adrien Thebo
<adrien@puppetlabs.com>
Merge branch 'pull-1615' into stable
(maint) Make sqlite3 use an in-memory DB (try 2)

The previous attempt to enable in-memory sqlite3 database testing for
the spec tests in 58e1c23 is insufficient because the
Puppet[:dblocation] setting is a type of FileSetting which munges values
using File.expand_path.  This is a problem because the path expansion
caused the database to be written to the filesystem rather than memory,
as intended.

This patch addresses the problem by adding a special case for all file
settings.  The munge operation is a no-op if the special value of
':memory:' is passed.
(#2244) Remove nil results in static compiler as well

Fix this bug in static compiler as well.
Merge branch 'dalen-2244_static_compiler' into stable

* dalen-2244_static_compiler:
  (#2244) Remove nil results in static compiler as well

closes #1610
(#14615) Don't run dangerous init scripts on Debian

The init service provider has an exclude list of init scripts which
shouldn't be executed because they don't actually have a status
subcommand. However, this list was missing a couple of scripts on Debian
which also shouldn't be run: rcS and module-init-tools.

This also adds an acceptance test verifying that `puppet resource
service` doesn't change the state of the system. It does this by running
it twice and making sure the output is the same. In certain cases, this
may actually fail to identify a problem (if the init script which causes
trouble runs first, for instance), so we also verify that a known
service (ssh) is unaffected by running the command.
Merge branch 'nicklewis-rcS-is-a-jerk' into stable

* nicklewis-rcS-is-a-jerk:
  (#14615) Don't run dangerous init scripts on Debian

closes #1617
(#20308) Add failing test for incomplete file list

Under certain circumstances the fileset will drop subdirectories from its
results. This adds a test showing this failure.

Paired-with: Andrew Parker <andy@puppetlabs.com>
(#20308) Make more of Fileset private

Several of the public methods on fileset only seemed to be there for
testing. There is no need for this as the behavior of the file listing
already checks the conditions controlled by those internal methods.

Paired-with: Andrew Parker <andy@puppetlabs.com>
(#20308) Fix dropping paths from fileset results

This fixes the issue in #20308 where some paths get dropped from the fileset
results.

Paired-with: Andrew Parker <andy@puppetlabs.com>
(#20308) Refactor fileset recursion for clarity

The previous expression of the algorithm for traversing the file structure and
producing the available files was hard to understand and therefore error prone
(see the bug that is being fixed here). This refactors it to be better
separated and should be easier to see any problems in it.

Another part of the cleanup was to make checks against the filesystem more
explicit: either the path is valid or not, whether the path is a directory.

Paired-with: Andrew Parker <andy@puppetlabs.com>
(#20308) Clean up the fileset specs

Paired-with: Andrew Parker <andy@puppetlabs.com>