Fix self-deadlock in tpch1
Fix self-deadlock in tpch1

In FinishWriting, we were holding the lock while trying to call
DoWriteAsync, which itself required the lock. Since the lock
isn't recursive, that caused a self-deadlock.

Change-Id: I96979ad7b28458c802355aace01b2e3de6d7966a
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1385
Reviewed-by: Matteo Bertozzi <1d5ca967930bde0bdce795acbf71a5e281d2d4e5@cloudera.com>
Reviewed-by: Jean-Daniel Cryans <4bf4c125525b8623ac45dfd7774cbf531df19085@cloudera.com>
Tested-by: jenkins

InspurUSA/kudu,andrwng/kudu,InspurUSA/kudu,InspurUSA/kudu,helifu/kudu,helifu/kudu,InspurUSA/kudu,andrwng/kudu,cloudera/kudu,InspurUSA/kudu,EvilMcJerkface/kudu,EvilMcJerkface/kudu,helifu/kudu,andrwng/kudu,helifu/kudu,andrwng/kudu,EvilMcJerkface/kudu,EvilMcJerkface/kudu,cloudera/kudu,EvilMcJerkface/kudu,cloudera/kudu,InspurUSA/kudu,cloudera/kudu,andrwng/kudu,helifu/kudu,andrwng/kudu,EvilMcJerkface/kudu,InspurUSA/kudu,cloudera/kudu,helifu/kudu,andrwng/kudu,helifu/kudu,andrwng/kudu,cloudera/kudu,EvilMcJerkface/kudu,EvilMcJerkface/kudu,EvilMcJerkface/kudu,cloudera/kudu,InspurUSA/kudu,cloudera/kudu,helifu/kudu,andrwng/kudu,InspurUSA/kudu,cloudera/kudu,helifu/kudu