[cmake,release] Do not try to set BUILD_SHARED from other variables.

With this patch the default is again building static libraries unless
one specifies -DBUILD_SHARED=True to cmake. This is not a fix but a
workaround for flyspray #1429
https://dune-project.org/flyspray/index.php?do=details&task_id=1429
(cherry picked from commit 49c9a27be560e1b62fce4571b6bf09c066d200bc)

Signed-off-by: Markus Blatt <markus@dr-blatt.de>
[bugfix] Fixes comparison operators.

The last patch missed a change in the comparison operators. Allocators
compare as equal if memory allocated with one can be deallocate with
the other. With this allocators compare equal only if they are share
the same address.

Cherry-pick from branch eature/FS1429-shared-lib-fixes where it ended up
by accident.
(cherry picked from commit c00b2acc0942ff1342c2e4533c722b7eadf20f67)

Signed-off-by: Markus Blatt <markus@dr-blatt.de>