Partial evaluation of boolean expressions

The previous implementation evaluated both sides of a boolean expression, meaning that:

    (foo isnt null) and (foo: bar())

would raise a NPE when `foo` is null, as `foo: bar()` would be evaluated, too. This commit shortcuts
evaluation of `and` and `or`.

Fixes #36