Added support for NChannelImage and ExtendToNChannel


Sorry for all the previous open/close pull requests. This is the only merge to look at.

This code is wrong! I asked to have the following assert promoted to a proper Exception:

``
 assert len(p.output_fns)==0
``

I agree that output_fns should be supported unless there is a good reason not too...