Image array handling and drawing utility

Utility functions to quickly render image array returned by
`ipzCaptureWindow2` (Not yet complete)
intermediate commit for timeout function

Intermediate changes added for incorporating timeout functions