Add 3D mesh generation capability to ImageMesh

This branch also allows `ImageMesh` and `ImageFunction` to share common argument parsing/error checking tasks associated with building file ranges.

Refs #3976.
I see, you're avoiding extra lines with the CPP directives.