Add base class for JUnit 4 tests, deprecate JUnit3 base class

- The AbstractFullNodeTest will need a member variable RandomSource
mRandom which is initialized the same way as in DatabaseBasedTest. So it
was indicated to create a common base class for both which contains that
code. This class aimed to do that. But if it were a JUnit 3 base class,
it would have to extend the TestCase class, and if you do that, the
JUnit 4 "@Before" is ignored. So this commit instead copy-pastes the
random number generator code from DatabaseBasedTest, and deprecates
DatabaseBasedTest so we can someday get rid of JUnit 3 completely.
- Also, a FIXME is added at DatabaseBasedTest to rename it to
AbstractJUnit3BaseTest so its name is symmetric to the name of the new
class added by this commit (AbstractJUNit4BaseTest). The part about
"once event-notifications is merged" can be removed since it has been
merged into master (and also this branch) already.