Add support for encodeImage

Also add a CvMat and IplImage struct...

This isn't perfect yet...I've not yet gotten the actual data back from the encoded image, but I have that problem with resize as well (so I'm really not sure why resize isn't working for me either).

Anyway, this should be mostly right.  Had to add dependency on ref-union and ref-array though.