Allow tristate checkboxes

Tristate checkboxes are useful for situations where the user needs to choose between turning something on, turning it off and leaving it in some other (indeterminate) state. This change adds a Boolean 'tristate' field to the CheckBox element. If this field is set to true, the checkbox cycles between ticked, not ticked, and ticked in gray to signal the indeterminate state. If the user chooses the indeterminate state, the returned value is null.