FE changes to avoid shipping null-type expressions to the BE.

Once the expr refactoring goes in, the BE will not be able to evaluate
any TYPE_NULL exprs. This patch ensures that the FE casts all null
literals and slot refs before they reach the BE.

There are a bunch of places where we know the appropriate type and
just weren't using it before. This patch also introduces a few notable
hacks:

* Serializing null SlotRefs and NullLiterals as boolean NullLiterals
  in case they weren't cast earlier.
* Converting null SlotRefs to NullLiterals in uncheckedCastTo() since
  we don't need to read from the slot at all.

This works, but we should consider adding a final pass that cleans up
the plan tree and takes care of this.

Change-Id: Ic2ee181139059553d7f2d0e17e9dacaee241df17
Reviewed-on: http://gerrit.ent.cloudera.com:8080/3294
Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com>
Tested-by: jenkins