[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.