Travis-CI: add support for rst testing

Since the logic is getting a bit complicated, I created a nice bash script in
the bin/ directory to actually execute the tests, based on the environment
variables that are set by Travis-CI.

Also I now use "[[" in all if statements instead of "[", as that is the
preferred way in bash.
Always run rst doctests
travis_test.sh: Change 'doc' -> 'doc/'

The 'doc/' should make sure that it doesn't test any file with "doc" in its
name again.
DOC: Skip a doctest that fails in Python 2.5

Eventually a better fix is to get the "with" statement working in Python 2.5,
but for now we just skip this doctest, so that all tests pass and we can start
testing doctests at Travis.
Merge pull request #1759 from certik/travis_rsttest

Travis-CI: add support for rst testing