Small tweak to read_buffer_word_by_type

* src/pf/codegen.lua: Reflow read_buffer_word_by_type a bit, and emit
  constants if possible.