Refactor dump_memory function.

- Add dumping memory around registers for x86/x86_64.
- Add unit tests for new dump_memory function.
- Cleanup all of the machine.cpp files.
- Increase the high address check for 32 bit, and decrease the high
  address allowed for 64 bit slightly to match mips64.

Bug: 21206576
Change-Id: I6f75141f3282db48b10f7c695a1cf2eb75a08351
diff --git a/debuggerd/tombstone.cpp b/debuggerd/tombstone.cpp
index ccdfe85..614edb6 100644
--- a/debuggerd/tombstone.cpp
+++ b/debuggerd/tombstone.cpp
@@ -654,7 +654,7 @@
   } else {
     ALOGE("Unwind failed: pid = %d, tid = %d", pid, tid);
   }
-  dump_memory_and_code(log, tid);
+  dump_memory_and_code(log, backtrace.get());
   if (map.get() != nullptr) {
     dump_all_maps(backtrace.get(), map.get(), log, tid);
   }