Add random identity generation function to DatabaseBasedTest. This
induced further changes:
- Add a RandomSource to it and print its seed. Thanks to toad.
- I've checked the other unit tests for usages of random numbers to
move to DatabaseBasedTest. In fact XMLTransformerTest contained code
which had to be moved. Luckily, it even overlapped
with the newly introduced code's needs.