[Encoder ME] Add basic cross search functions and its unit tests

reviewed at https://rbcommons.com/s/OpenH264/r/253/