so merge from the bsddb-bsddb3-schizo-branch back to the trunk.
version 4.1.1 and works with up to BerkeleyDB 4.1.25.