Simplify middle() and fix docs

The special cases gave the same result as the general rule, which is
the only intelligible one. Fix the docs and explain the rule as regards
the result type.

I'd like somebody to check this is correct as I don't understand why special cases would have been created if they weren't necessary. I'm also not sure whether the `+ zero(x)` is really needed (maybe just in case for a new type addition changes type?).

CC: @remusao about the docs