Refactor search_selfguided_restoration
Refactor search_selfguided_restoration

Pull the per-unit processing out into a couple of new functions,
to make the overall logic of search_selfguided_restoration()
a bit more obvious

Change-Id: Ib4ed9be7d4c76e22dc56f933f3f9d09160242f71

GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom,GrokImageCompression/aom