Added a --repeat option for testing

In some cases, we need to debug non-determininstic failures, and for this it can be handy to have a ``--repeat`` option. For example, for https://github.com/astropy/astropy/issues/2964 the failures only happen 10% of the time, so having this kind of option makes it easy to run the test say 100 times to determine how often it fails (and to force it to fail). This can also be useful for pre-empting issues like https://github.com/astropy/astropy/issues/3018 - there may be issues that only become apparent once we have enough tests. This change will need a corresponding change in astropy-helpers to add the option to ``python setup.py test`` but in the mean time it works with ``py.test --repeat=10`` for example. I'll do a PR for astropy-helpers if there is support for this PR.