blockchain: Only mark nodes modified when modified.
blockchain: Only mark nodes modified when modified.

This updates the code which deals with marking block nodes modified when
setting and clearing status flags to only mark them modified if the
status flags actually change.

This is more efficient as it prevents the need to write nodes that
haven't actually changed to the database.

decred/dcrd,jrick/dcrd,decred/dcrd,jrick/dcrd