analysis: remove redundant variables, cleanup variable names

--HG--
extra : amend_source : f16ac62b91eecc17d913d95ac8175921718df121
analysis: remove CheckBestMode from CheckIntra
psy-rd: fix bug in chroma psyEnergy for intra 4x4

Also add TODO, for all psyCost calculations
analysis: nits
search: clean xRecurIntraCodingQT

--HG--
extra : amend_source : 7653cfd90bb0e4cc14bb7e2c8fde8069d77c19fe
motion: avoid extra iterations when no subpel motion found

subsequent iterations would have also returned zero, which would be pointless.
this is an adaption of a patch by Sheva Xu.
bitcost: use enums for special constants rather than static const ints

enums require no storage
nits: do not check for NULL from new operations

By the C++ spec, new is incapable of returning NULL. If an allocation failure
actually occurs, an exception is issued (which we do not catch)
Long term, all of these new operations need to be replaced by malloc and
explicit initialization and destruction. In the short term, these return value
checks are redundant.
bitstream: add paren to avoid ambiguous precedence in X265_CHECK
entropy: fix SAO enable detection (refs #80)

Apparently our analysis never toggles luma separately from chroma because this
bug has not resulted in any bad bitstreams, that I know of. This bug was found
via static analysis
encoder: use %u to sprintf unsigned ints (refs #80)
TComWeightPrediction: combine duplicate inline functions (refs #80)
predict: merge TComWeightPrediction functions into Predict

* TComWeightPrediction had no member vars, the constructor was useless
* half of the functions were not used, they were dropped
* default arguments were removed, none were actually required
* x prefixes removed from method names
* comments were cleaned up
predict: don't bother keeping refidx as an array

it is always indexed explicitly
nits: use parantheses to improve readability in shifts