Support wider range of bool parameters in the api: 1 or 0 -> 1/True/true or 0/False/false

Fixes #616