HighGui: store the CString of the window name in the Window
HighGui: store the CString of the window name in the Window

Previously, with each operation on a Window we had to allocate a CString
based on the name String stored in the Window. This doesn't matter that
much for one-of operations. However this is inefficient for operations
like `imshow` which are usually executed as part of a game-loop.

I now store a ForeignPtr to the characters of the window name in the
Window record. When the Window is garbage collected so are the
characters.I also added the internal utility function:

  withWindow :: Window -> (CString -> IO a) -> IO a

This is an O(1) operation instead of the O(2n) withCString operation we
used before.

Cortlandd/haskell-opencv,lukexi/haskell-opencv,Cortlandd/haskell-opencv,lukexi/haskell-opencv