Use simple JS object for tracked item

Attempt to fix a randomly occurring bug by turning trackedItem into a
JS object on first access (rather than using the mongoose object).