add thunk patch type

This deals with thunks by creating a THUNK patch type. The thunk type maps a node to a set of patches, so we are effectively calling diff recursively for thunks instead of just on the root node.