TEncCU: inserting runtime checking for m_totalPsyCost
psy-rd: bug fix in merge mode, use psyCosts for all decisions whenever psy-rd is enabled
TEncCu: nit
rest: add missing --no-repeat-headers option
pool: allow thread private data structures

Pass worker's threadId to JobProvider::findJob() and allow job providers to use
this ID as they see fit to keep thread local data. No behavior changes, this is
just laying the plumbing for future optimizations.
nits