fix indentation
make use of some sequelize APIs to improve code quality
Commit summary:
1. code clean up: item.js, thread.js, api.js
2. make use of sequelize API:
   - api.js: many things...
   - populate.js: using Model.bulkCreate instead of .create