[chore] Refactoring and fixing jshint errors

real-time.js
- Refactored _saveCollectionTimes function
- split common code into separate _saveCollectionTime function

common.js
- Fixed jshint error with line break on &&
Merge pull request #49 from alex-deaconu/chore/refactor

[chore] Refactoring and fixing jshint errors