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