Double-check that the input image's density is valid

Fixes a bug that could result in division by zero, at least for a JPEG
source image.
Fixes issues #19, #20
IW_IMPL(void) iw_set_input_max_color_code(struct iw_context *ctx, int input_channel, int c)
{
	if(input_channel>=0 && input_channel<IW_CI_COUNT) {
		ctx->img1_ci[input_channel].maxcolorcode_int = c;
	}
}

IW_IMPL(void) iw_set_input_max_color_code(struct iw_context *ctx, int input_channel, int c)
{
	if(input_channel>=0 && input_channel<IW_CI_COUNT) {
		ctx->img1_ci[input_channel].maxcolorcode_int = c;
	}
}
