Fix string-to-boolean casting in queries

There is a function that converts strings to boolean that uses the
following rule:
Strings-True ('1', 't', 'true', 'on', 'y', 'yes') are converted to True
Strings-False ('0', 'f', 'false', 'off', 'n', 'no') are converted to False

But there is a default value (False by default) that returned in case when
the string is not in any of lists above. So by default any string that is
not in Strings-True will be converted to False. We may change this behaviour
by using strict=True checking.

If user creates a query we should validate that only valid strings (as above)
or boolean True or False are used in case of boolean filter.

Relates to bug 1236496

Change-Id: I83a54f09d715269c2d356bb7979a0372e6f7d2d0
Updated from global requirements

Change-Id: Iec06d578879ff880152a1fa48d952a691a1b3306
Merge "Fix string-to-boolean casting in queries"
Merge "Updated from global requirements"