random() and randomSeed() arduino-compatible functions

@towynlin did the hard work, I just added some tests.