Factor out mode estimation process in tpl model build

Use standalone function to process the mode search and rd cost
estimate for a given coding block.

Change-Id: I77cdbded43966c4546e5407ae318129d89d888a4
1 file changed