Bug 847406 - Refactor call log rendering algorithm r=etienne