Document ImageBuf

Not expecting a review, just posting as a pull request so people following the project are aware that a bunch of docs were added.

I altered imagebuf.h a bit in the process, but just moving things around, fixing comments, renaming parameters, clarifying.  (It's amazing how, in writing real docs, you find all the little presentation flaws in the header.)  But no changes in functionality or compatibility.