Add preliminiar incremental update function.

Add initial logic of incremental update that does not include
real repository update but describes the overall update logic as
well as provides some digest related utilities.