Import memoffset from crates.io

This is generated with get_rust_pkg.py, plus
 - src/lib.rs, src/span_of.rs
 - patches/std.diff
   * Since Android does not support building with no-std, disable no-std
     and replace `core` with `std`.
 - Android.bp
 - patches/Android.bp.patch
   * remove doc-comment just to avoid one dependnecy. Can be added later.
 - TEST_MAPPING

Bug: 174797066
Test: mma
Test: tools/external_updater/updater.sh update --refresh --keep_date
      rust/crates/memoffset
Change-Id: I836d46eb71f1f0b1449318076e0eb266adbfe4c9
diff --git a/ci/miri.sh b/ci/miri.sh
new file mode 100644
index 0000000..5aea2ec
--- /dev/null
+++ b/ci/miri.sh
@@ -0,0 +1,14 @@
+set -ex
+
+# Install Miri.
+MIRI_NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)
+echo "Installing latest nightly with Miri: $MIRI_NIGHTLY"
+rustup default "$MIRI_NIGHTLY"
+rustup component add miri
+
+# Run tests.
+cargo miri test
+cargo miri test --all-features
+
+# Restore old state in case Travis uses this cache for other jobs.
+rustup default nightly