Fix segfault in python ImageInput.read_* functions

which happens when calling one of the ImageInput.read_* functions
without specifying a type/format.

The reason:
When not specified, the format would be TypeDesc::UNKNOWN. So, calling
format.size() to determine how much memory to allocate will (probably)
not work.

The subsequent call to the C++ read_* function will further return the
image data in the native format, which will not work together with
C_array_to_Python_array(), which assumes float if format is
TypeDesc::UNKNOWN.

This commit sets format to spec.format (i. e. the native format) if
format is TypeDesc::UNKNOWN to match the behavior of the C++ functions
(i. e. return data in native format).