add clear method to cpp thrift messages