redesigned image_buffer module and added perf

The module image_buffer was redesigned to use only on structure to hold
any type of image data, such as uchar or float.

Signed-off-by: Diogo C. Luvizon <diogo@luvizon.com>
bug fix on function image_buffer_realloc

Signed-off-by: Diogo C. Luvizon <diogo@luvizon.com>