Previously, its impossible to know if the results you are working with
in the puppet manifest are in string or array form without counting
them. This work ensures that an array is always returned, even if there
is only one item returned.
This is useful in situations where an attribute is commonly both
multi-valued and single-valued to avoid complext manifest code.
Ldap has the potential to slow down compiles if a search takes too long.
Here we add timing information to the debug output, so that in case of
question, we can at least have a method of determining the time a given
search took.
Testing the methods inside of the function is a complete pain. This
moves the code out to use the PuppetX pattern and adds some basic unit
tests that validate the logic.