IMPALA-1400: Window function insert issue (LAG() + OVER)

This commit fixes an issue where an error is thrown during planning
when an insert-select statement contains an analytic function. The issue
was caused by a missing mapping step of logical to physical tuples for
the case of insert statement.

Change-Id: I68d856b1fda4dd0a7345648459e466d90d95201f
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4911
Reviewed-by: Marcel Kornacker <marcel@cloudera.com>
Tested-by: jenkins
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4915
Reviewed-by: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>