updates stats.py and Revert_and_branch.md to work nice with the testing ...

...module

Hi everyone, especially @kbroman. This PR updates the `stats.py` file and the `Revert_and_branch.md` file to be able to coexist without rewriting much of the testing tutorial. Instead of implementing `var()` I suggested implementing `median()` with (hopefully) sufficient hints. At issue is that the testing module a) assumes `std()` is empty and a simplified `mean()` function.