Templatize assembler proper.

Move things minimally to make it work.

R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/141990043