added a framework that can handle ItemData as const.

To reduce the change volume of code, we redefine a smart pointer
for ItemData: ItemDataPtr to make it have a const ItemData pointer.
Instead a new type of the smart pointer: InProcessItemDataPtr was
introduced. It is the same as the previous ItemDataPtr, which has
a non const ItemData pointer.