FOR-147: Denormalize document fields and refactor model code for faster comment thread assembly.