hmap_init(): hmap_deinit() before returning error

Signed-off-by: Paul Holden <paulholden2@gmail.com>
gfx/hmap: Tweaks to hmap_init() code

- Zero-mem *hm so hmap_deinit() knows what is initialized and what isn't,
  in case of an error.

- Make stb_image callback struct static and global.

- Make stb_image callback functions static.

Signed-off-by: Paul Holden <paulholden2@gmail.com>