Make define_property() scriptable

This will allow CMakeParseArguments and some other modules that use
define_property (i.e. ExternalProject) to be used in script mode.
CMakeParseArguments: Do not skip empty arguments

Current implementation of cmake_parse_arguments skips empty arguments.

For example:

  cmake_parse_arguments("OPTION" "SINGLE" "MULTI" ${ARGN})

with ARGN that is set using something like:

  <args> SINGLE "" <more args>  # (<args>;SINGLE;;<more args>)
  <args> SINGLE ""  # (<args>;SINGLE;)

it will fail in 4 different ways:

1) because the "foreach" skips empty arguments.
2) because list(APPEND <list> ${currentArg}) will fail to append an
   empty element to the list if ${currentArg} is an empty string.
3) because set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE)
   will not set an empty variable to the parent scope if
   ${${prefix}_${arg_name}} is an empty string.
4) because empty arguments are not passed to cmake_parse_arguments
   if not quoted, i.e. if ARGN="a;;b"
   * ${ARGN} will pass the arguments "a", "b"
   * "${ARGN}" will pass the arguments "a", "", "b".

This patch fixes the first behaviour using foreach(IN LISTS) version,
the second and the third by enclosing args in quotes where required, and
finally fixes the documentation in order to suggest to use quoted
"${ARGN}" in order not to miss the empty arguments at the end of the
list.
CMakeParseArguments: Keep compatibility with previous behaviour

The behaviour is now decided as follows:

* If CMAKE_MINIMUM_REQUIRED_VERSION < 2.8.13, the default behaviour is
  to skip empty arguments, otherwise the default behaviour is to keep
  them.
* Using the CMAKE_PARSE_ARGUMENTS_DEFAULT_SKIP_EMPTY directory property
  the user can explicitly set the default behaviour for a folder and its
  subfolders.
* Using CMAKE_PARSE_ARGUMENTS_(SKIP|KEEP)_EMPTY or as the first argument
  of the call after the mandatory ones, the user can specify whether to
  keep or to skip the empty arguments, regardless of the default
  behaviour for that cmake_parse_arguments() call.

Therefore the new syntax is:

  cmake_parse_arguments(<prefix>
                        <options>
                        <one_value_keywords>
                        <multi_value_keywords>
                        [CMAKE_PARSE_ARGUMENTS_SKIP_EMPTY|CMAKE_PARSE_ARGUMENTS_KEEP_EMPTY]
                        args...
                        )
CMakeParseArguments: Add workaround for compatibility with CMake <= 2.8.12

This "wrapper" macro is a workaround that allows to use this version of this
module with CMake <= 2.8.12.
Before that version set(VAR "" PARENT_SCOPE) did not set the variable in
the parent scope and instead it used to unset it.
This wrapper calls the real function, but if necessary (i.e. when empty
arguments should not be skipped and CMake < 3.0.0) it parses the arguments
again in order to find single and multiple arguments that have not been set
and sets them to an empty string in the same variable scope as the caller.
CMakeParseArguments: Use "if(COMMAND)" as module guard

set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE) does not protect from being
included twice if the module is included in different places from
different scopes.  Using if(COMMAND) guarantees that the file is not
included twice.
CMakeParseArguments: Update documentation
CMakeParseArguments: Add unit tests
Merge topic 'CMakeParseArguments_EmptyArgs' into next

10fd6fb CMakeParseArguments: Add unit tests
fa81f53 CMakeParseArguments: Update documentation
cbb72c8 CMakeParseArguments: Use "if(COMMAND)" as module guard
a40eb53 CMakeParseArguments: Add workaround for compatibility with CMake <= 2.8.12
67e0d4d CMakeParseArguments: Keep compatibility with previous behaviour
65eeb81 CMakeParseArguments: Do not skip empty arguments
96cf67a Make define_property() scriptable