Handle NoneType docstrings to support the -OO interpreter option
This fixes the issue I described in #1741.

When running uWSGI with the `--optimize` option set to `2`, it passes the `-OO` option to the interpreter and then there are no docstrings and pandas errors out during import.

I also noticed there was a note about this [here](https://github.com/pydata/pandas/blob/master/pandas/util/decorators.py#L74).

Thanks. I cherry-picked this commit so you should `git reset --hard origin/master` after fetching the pydata upstream branch
