Refactor RelativePatcher out of OatWriter.

Move the relative patcher classes to compiler/linker/ and
compiler/linker/<arch>/ . Refactor them to avoid OatWriter
dependency so that they can be unit tested. Add tests for
x86 and x86-64.

Change-Id: I1b42baa9fc431378e4cce1399bec590c5b5a409f
diff --git a/compiler/Android.mk b/compiler/Android.mk
index 904f117..eaea031 100644
--- a/compiler/Android.mk
+++ b/compiler/Android.mk
@@ -79,6 +79,13 @@
 	driver/compiler_driver.cc \
 	driver/compiler_options.cc \
 	driver/dex_compilation_unit.cc \
+	linker/relative_patcher.cc \
+	linker/arm/relative_patcher_arm_base.cc \
+	linker/arm/relative_patcher_thumb2.cc \
+	linker/arm64/relative_patcher_arm64.cc \
+	linker/x86/relative_patcher_x86_base.cc \
+	linker/x86/relative_patcher_x86.cc \
+	linker/x86_64/relative_patcher_x86_64.cc \
 	jit/jit_compiler.cc \
 	jni/quick/arm/calling_convention_arm.cc \
 	jni/quick/arm64/calling_convention_arm64.cc \