Start writing out some relocation sections (text).

Pass the full assembler pointer to the elf writer, so
that it has access to both the text buffer and the fixups.

Remove some child classes of AssemblerFixups. They didn't
really do much, and were pretty much identical to the
original AssemblerFixup class. Dart had a virtual method
for fixups to do necessary patching, but we currently
don't do the patching and just emit the relocations.
TODO see if patching is more efficient than writing out
relocations and letting the linker do the work.

This CL also makes AssemblerFixups POD.

Change the fixup kind to be a plain unsigned int, which
the target can fill w/ target/container-specific values.

Move the fwd declaration of Assembler to IceDefs and remove
the others. Do similar for fwd declaration refactoring for
ELFWriter.

Make the createAssembler method return a std::unique_ptr.

BUG=none
R=stichnot@chromium.org

Review URL: https://codereview.chromium.org/828873002
diff --git a/src/IceTargetLowering.h b/src/IceTargetLowering.h
index e07bdeb..f2e5863 100644
--- a/src/IceTargetLowering.h
+++ b/src/IceTargetLowering.h
@@ -24,8 +24,6 @@
 
 namespace Ice {
 
-class Assembler;
-
 // LoweringContext makes it easy to iterate through non-deleted
 // instructions in a node, and insert new (lowered) instructions at
 // the current point.  Along with the instruction list container and
@@ -94,7 +92,8 @@
 
 public:
   static TargetLowering *createLowering(TargetArch Target, Cfg *Func);
-  static Assembler *createAssembler(TargetArch Target, Cfg *Func);
+  static std::unique_ptr<Assembler> createAssembler(TargetArch Target,
+                                                    Cfg *Func);
   void translate() {
     switch (Ctx->getOptLevel()) {
     case Opt_m1: