(CFACT-91) Add Windows external fact

Add external fact support and execution infrastructure.
New to Windows are batch files and Powershell scripts.
Implement get_external_fact_directories and can_resolve on Windows.
Add scoped_env class for modifying and restoring the environment, useful on Windows because it's easier than directly modifying the child environment in some cases.
Split module::execute_command into Windows and Linux variants to handle shell execution.
Fix failing unit tests on Windows, enable unit tests in AppVeyor.
Add ruby in AppVeyor for unit tests.
Add execution unit tests.
Fix util::each_line for Windows line endings.
(CFACT-91) Enable logging and environment testing on Windows

Add unit testing related to execution and update environment::get, which didn't work on Windows for variables modified in the same process.
(CFACT-91) Add powershell resolver and unit test
(CFACT-91) Add unit test for scoped_env and environment::clear
(CFACT-91) Add test asserting Powershell architecture matches compilation

We want to use 64-bit Powershell on 64-bit Windows. The Powershell used is determined by the architecture of the process
executing it, by hidden Windows redirection. This test confirms that 64-bit Powershell is used for a 64-bit compiled
facter, and 32-bit Powershell is used otherwise. This should cover most desired cases of providing 64-bit Powershell
to users.
(CFACT-91) Restructure execution tests

Combine common tests (yaml, json, txt) in collections.cc, and add external facts testing for powershell.
(CFACT-91) Resolve potential dead-lock in reading stdout/stderr

If a child process writes to stderr exceeding the pipe buffer, the child will block on write. If we don't simultaneously
read stderr, ReadFile on stdout can block the thread, leading to a deadlock. Implement a thread for reading from stderr
and writing the results to LOG_DEBUG.
(CFACT-91) Rework execute to share stream-processing code

Execute has a section that processes stream output from ReadFile/read, either calling a callback or concatenating the results.
Extract that code into execution::process_stream so it can be shared between Windows/Linux, accepting a closure that yields
new data from a stream.
(CFACT-91) Clean up interface for process_stream

Use strings in the yield_input closure passed to process_stream for a more consistent interface.
We have to abuse STL strings a little to avoid copies with C-api calls, but this usage is
conformant to C++11 (the buffer is guaranteed contiguous, and resize fixes the string metadata).
(CFACT-91) Use boost::optional to clarify intentions
(CFACT-91) Address FACT-710 for cfacter

When facter is a 32-bit process running on 64-bit Windows, it silently redirects the system directeries
to 32-bit binaries. Using 32-bit powershell to manage 64-bit Windows causes problems, so we first try
sysnative (a directory that only exists in 32-bit executables on 64-bit Windows) to find the 64-bit
binaries, then fall back to looking for powershell on the PATH.
(CFACT-91) Document new properties
(CFACT-91) Restore execution parsing performance

Restores performance with respect to heap allocations of execution
result parsing. Also removes unnecessary copies in scoped_env.
(CFACT-91) Use boost::split_iterator instead of split

Use split_iterator instead of split to avoid creating a vector of ranges
when all we need is the range we're processing at that moment.
(CFACT-91) Use assign of a range instead of substr

Avoids losing the internal buffer in output by doing move assignment
from the substr result. Potentially saves some memory allocations.
(CFACT-91) Ignore stderr instead of writing to LOG

Done for consistency with POSIX.
Merge pull request #151 from MikaelSmith/task/master/CFACT-91-implement-external-facts-on-Windows

(CFACT-91) Implement external facts on Windows
(maint) Fix scoped_resource to not have a vtable.

If we prevent scoped_resource from being free-store allocated by
deleting new and delete operators, then there's no reason for
scoped_resource to have a virtual destructor.

Additionally, the move semantics weren't correct.  There's no reason to
default construct either the resource and the deleter of the old object.
Instead, simply move them.
(maint) Remove unncessary variable in CMake source lists.

We don't need the verbose use of the CMAKE_CURRENT_LIST_DIR variable in
our source file lists.  The files are already relative to where the list
file.
(CFACT-124) Move os and os_family constants out of POSIX.

Moving the os and os_family constants out of POSIX and into the generic facts
namespace where they can be used by Windows too.