Log an update event on categorization and program modify

- Upgrades Mongoose due to a bug in sub document saving
- Create utils.flattenObject
- Create a updateAndLogChanges method that can be used when updating
  objects