Grab-bag of halide_image_io cleanups
Grab-bag of halide_image_io cleanups

Mostly just stylistic and terseness.

-- change the load and save methods to be table-driven, to simplify future format support additions
-- all if statements are { enclosed in braces}, no single-liners
-- helper methods added to FileOpener to reduce error-prone boilerplate
-- some constant-at-compile-time code restructured to make it more obvious (eg constexpr)
-- swap_endian_16 returns result rather thanout-by-ref

(Side note: do we have any unit tests for PPM and/or PGM?)


Former-commit-id: 2c4bbf523f68d35abb7c28389cb7f0c8c0007909
darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,Trass3r/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide