Cropping: fix wrong readout and cast of RGB-slice setting

A checkbox's ".val" property returns a string ("on" or "off"). Treating
it as a boolean will therefore make it always true (A non-empty string
is always true in JavaScript). Instead, the ".checked" property has to
be used.

In the back-end it is safer to cast the 0 or 1 we get to an integer
first, before we make it a boolean.