reorganization to make libshadow work both as a valgrind shadow memory backend and as a general purpose shadow memory library