Enable codegen for incremental stats

Plus a bugfix in a DCHECK.

Change-Id: I21d9fe310434f74912b4d6a0d27f29fa4782bf93
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5454
Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com>
Tested-by: jenkins
(cherry picked from commit 36496df1d710758b6ebf2e6da18a0a59fbe449ea)
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5459
Reviewed-by: Henry Robinson <henry@cloudera.com>