Introduce Entry::type

It can be one of new, update, delete.

This way we won't need to distinguish the 3 by
heuristics like whether there is any content, or
whether the node already exists.
Take advantage of the entry type in the JS side