Merge WatchTwice into existing variable_watch test
variable_watch: Add test for watching a variable multiple times

Currently, variable_watch will only use one callback (the last one
used), but there's no reason that multiple watchers should not be
allowed for a single variable.

This test is fixed by this branch.
variable_watch: Store client data as pointers

The STL containers create extra copies which makes keeping track of the
owner of the client data much messier.
variable_watch: Add a deleter for the client data

The client data is arbitrary and the callback may be called an
unspecified number of times, so the cmVariableWatch must be the one to
delete the client data in the end (if it is needed at all).
variable_watch: Match client_data when finding duplicates

If a callback has the same data as another call, we don't want to delete
the old callback. This is because if the client_data is the same, it
might get deleted causing the new client_data to be bogus. Now, AddWatch
will return true if it will use the watch, false otherwise. Callers
should check the return value to know whether client_data was adopted by
the watch or not.
variable_watch: Allow specifying the data to match in RemoveWatch

Now that watches are dependent on their client_data when adding, it also
makes sense to allow matching the data for removal.
variable_watch: Prevent making extra entries in the watch map

When removing a watch on a variable, using the operator [] on the
internal map will create an empty watch if the variable doesn't have any
existing watches. Rather than creating this empty structure in the map,
return if there isn't a watch on the variable already.
variable_watch: Fix a typo in the error message

There was no space between "callback" and the quoted command name.
variable_watch: Don't share memory for callbacks

The command itself is owned by the cmMakefile class, but the
cmVariableWatch which holds a pointer to the cmVariableWatchCommand via
the client_data for the callback outlives the cmMakefile class in the Qt
GUI. This means that when the cmMakefile is destroyed, the variable
watch is still in effect, but with a stale pointer.

To fix this, each callback is now a separate entity completely and
doesn't rely on the command which spawned it at all.

An example CMakeLists.txt which demonstrates the issue (only displayed
in cmake-gui, so no tests can be written for it):

    set(var 0)
    variable_watch(var)
variable_watch: Check newValue for NULL

On read access, newValue can be NULL since there is no new value, so use
the empty string instead.
Fix style in destructor
Merge topic 'dev/fix-variable-watch-crash' into next

2314115 Fix style in destructor
1d2eb87 Merge WatchTwice into existing variable_watch test
Merge topic 'dev/fix-variable-watch-crash' into next

56e770f variable_watch: Check newValue for NULL
cf4364c variable_watch: Don't share memory for callbacks
6379d72 variable_watch: Fix a typo in the error message
9df9825 variable_watch: Prevent making extra entries in the watch map
f92f3ff variable_watch: Allow specifying the data to match in RemoveWatch
faad4e1 variable_watch: Match client_data when finding duplicates
8c0a98e variable_watch: Add a deleter for the client data
dc1c654 variable_watch: Store client data as pointers
8d1fc6c variable_watch: Add test for watching a variable multiple times