Fix for Python Thrift client when it encounters an exception on write

Make sure we clear wbuf on exception, so it doesn't contain a partial function call.

As the branch name suggests, this is for https://issues.apache.org/jira/browse/THRIFT-2825. This is my first time contributing to Thrift, so let me know if there's something I should be doing differently!