[SPARK-2658][SQL] Add rule for true = 1.

Author: Michael Armbrust <michael@databricks.com>

Closes #1556 from marmbrus/fixBooleanEqualsOne and squashes the following commits:

ad8edd4 [Michael Armbrust] Add rule for true = 1 and false = 0.

(cherry picked from commit 78d18fdbaa62d8ed235c29b2e37fd6607263c639)
Signed-off-by: Reynold Xin <rxin@apache.org>