state: lifecycleWatcher now supports document ids of arbitrary type

This is required to support the upcoming change to struct style document ids.

http://reviews.vapour.ws/r/156/diff/