bring SyntaxElementWriter into common/, remove trace file macros

File tracing has been essentially broken since frame parallelism was introduced
(not to mention multiple encoder instances in a process) and is going to be
soon even more impossible when the second encodeCU() pass is removed. It's best
to remove this old HM feature so people don't get stuck trying to use it.

Stream analyzers like Parabola and Elecard are now mature enough that these
trace files are not very helpful. If you *really* want the old style trace
file, enable tracing in the HM decoder and decode your bitstream with it.

I left the strings in the WRITE_* macros in place because they make those calls
reasonably self-documenting. The compiler will throw them away harmlessly.
bitstream: convert macros into inline members for better compile-time checking
bitstream: hoist trivial methods to the header so they may be easier inlined
cu, search: remove redundant m_rdGoOnSbacCoder pointer

m_rdGoOnSbacCoder was always either pointing to the same SBac as m_sbacCoder
(for calls to compressCU()) or it was supposed to be unused (for calls to
encodeCU)
ppa: cleanup event names and remove uninteresting events
frameencoder: remove unnecessary include of TEncSearch.h
cturow: rename m_rdGoOnSbacCoder to m_sbacCoder; there is only one
framefilter: rename row0 coder
entropy: clarify the SBac's bit counting mode

The SBac class has always had the ability to be a bit counter without any other
external data structures. With this change, the SBac defaults to being a bit
counting SBac until it is given a Bitstream object to write into.  The class
no longer accepts a BitCounter object, since it would only add more overhead
to the bit counting.

TEncCu no longer needs o be told whether it is writing into a bit counting
SBac or not, it can ask the SBac to find out.

The BitCounting class is only used for SEI writing, and may disappear in order
to remove the vtable from the critical path of entropy coding.
compress: save CABAC context in merge modes for lower RD levels.
compress: save CABAC context after inter/merge decision
compress: save CABAC context after intra decision.

Since CABAC encode happens only for rd > 2
compress: save CABAC context for rd = 2 after inter/intra encodes
derive TEncCu from TEncSearch

TEncSearch methods are only callable from TEncCu methods. and there is much
duplication in their data members. This removes a lot of redundancy and removes
a lot of pointer dereferences
search: make RDCost and TComTrQuant member instances of TEncSearch

Both of these structs are required by TEncSearch, it cannot operate without them
There is always a 1::1 correlation with each. There is no reason at all to
allocated them separately in TLD and then link them all together.  Much simpler
for them to be members of the TEncSearch class.
zero stride for zeroPel[]
cli: retrieve params from the encoder, in case logging flags have changed

For instance, if the user asked for --lossless --ssim, the encoder will disable
SSIM for lossless encodes and we don't want the CLI to report SSIM stats that
were never measured.
cu: nits
cu: directly use param fields for lossless coding options

Remove m_CUTransquantBypass, m_TransquantBypassEnableFlag
cu: fixing int-to-bool compile warnings