Fix NPEs (and startup for db4o 8.0)

The NPEs need to be fixed for the following WOT-fix to work:
https://bugs.freenetproject.org/view.php?id=5362

I am not sure whether this pull request includes the startup fix for db4o 8.0 or not:
- The commit list includes it
- The "Files changed" menu does not show it.
How to interpret this?