Code cleanup: consolidate calls to the transport's flush() in client code

This also fixes a header protocol bug, because flush must be called on the output protocol's transport (which may be a wrapper around the TChannelBufferOutputTransport that was being flushed before this change)
Code cleanup: move setMaxFrameSize next to getMaxFrameSize in ThriftServerConfig