Ensure __and__/__or__ of PYSON is always boolean

issue4187
review9731002
(grafted from be0d97713666acd24354171459f047626dcf9f3d)

--HG--
branch : 2.6
extra : source : be0d97713666acd24354171459f047626dcf9f3d