Refactor init_repositories()

Repo updates should not use any global data from the release
description file. Instead it should use only the data given in each
repo section.

Also fix the "pending directory" path generation and usage to
avoid collisions.

As a consequence other minor fixes and refactoring into the
script.

Change-Id: I548035aad54017197cdc5c93d8172a9dfc15ae0b
Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>