Added bag-of-words model into sampler

      Naive implementation, I'll speed it up
First pass at improving sampler speed

      - Changes order on loops so we iterate through arrays in contiguous
        order
      - Makes sufficient statistics update in place, saving on memory allocation