refactoring, moving onSuccess and on onFailure methods to the main class for reuse
PLGDS-217 Retrying fetching datasource metadata at least once

Task-Url: https://jira.codenvycorp.com/browse/PLGDS-217