cmake: fix auto-link issues with MSVC

If you tell MSVC to link with the static lib, the dependencies somehow fail and
x265.exe is not re-linked properly when the static lib is changed.

--HG--
branch : stable
common: add CHECKED_MALLOC macro that logs malloc failures and jumps to fail label

--HG--
extra : rebase_source : 03195b8c3267dee542fe12886617902b7333a202
encoder: Do not use X265_MALLOC use CHECKED_MALLOC

Currently X265_MALLOC did't validate the returned pointer, CHECKED_MALLOC Always
validate the returned pointer and print the Log message and jumps to fail lable
if returned pointer is not valid,

--HG--
extra : rebase_source : f0fd5047d04cacb1bf3cd9a8f30f554a2d24c164
Bug Fix - copy last Recq value to thread local rce object

Missed this out in previous patch.

--HG--
branch : stable
encoder: style nits, no logic change

--HG--
extra : rebase_source : 3a44a88c3859db4d2f022326976d63c31019cedf
Merge with stable