Move archive extraction to a separate function.

According to the requirement of compatibility with all repository
styles, move archive extraction to a separate function in update
code. So extracting and signature checks can be performed for all
repositories: both sqlite and yaml ones.

Reorganize constants slightly while I'm here.
Organize full repo update as separate function.

To handle both types of repos it is necessary to have full update
as a separate procedure.