Invert berkeleydb & berkeleydb-insrc

To berkeleydb-nonsrctree & berkeleydb
Also fix autogen-template for berkeleydb to ../dist instead of $(srcdir)