BUG: Make f2py work with intent(in out).

Note that Fortran ignores spaces in this case, so that 'in out' is
treated as 'inout'.

Closes #479.

Rebased for backport to 1.9.0.