BUG: fix cython magic support in ipython_directive

#4791, #4570

This was fixed in pandas a little while ago and as far as I can tell
wasn't broken in ipython by the recent updates but has always been broken.

There's an off-by-one-space error in the continuation stripping code in block_processor,
and I fixed it there rather then carrying over the pandas fix which processed the output
later on.

as far as differences between the pandas and ipython versions, that just leaves the 
`:okexcept:` keyword for suppressing known exception from hitting the console and 
some unicode tweaks. @takluyver, would you accept a PR with those?
if so, we can remove our copy in pandas and point to you.

I tested this on the pandas docs and everything seems fine (Except the missing fixes I mentioned).

cc @jorisvandenbossche