Add tests for LOGICAL_AND/OR.

Redmine: refs #2354.
Change LOGICAL_AND not to evaluate rhs if lhs == FALSE.

Redmine: refs #2354.
Change LOGICAL_OR not to evaluate rhs if lhs == TRUE.

Redmine: refs #2354.