fixes for bugs arising for image convolution
code reformat
ensure file read result is valid C string

When reading from file, increase read buffer size by 1 and
stuff a null terminator into the final element. This
guarantees the content can be used with such functions as
strlen().
fix bug in exporting images
fix typo
fix possible bug on windows
remove ifdef block
clear cuda memory after allocating
add rt library to Cmake
fix double free
initial work on supporting histogram mp and randomize allocated cuda data
fix typos
add changes by bkons
enable randomization
propegate error
bug fixes
fix typo and disable randomization of input