IMPALA-1438: Zero-row insert creates empty data file

DataSink should check if there is any row to output before creating data file or
sending data so it doesn't generate zero size data file or create empty partition
directory. It also fixes the issue reported in IMPALA-1432.

Change-Id: I58c995f7d5cda203c23bdd9d09776e4cf35c2246
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5545
Reviewed-by: Juan Yu <jyu@cloudera.com>
Tested-by: jenkins