Update the priority of restore from remote sources

Break the remote sources into two groups. The group of the http based
sources won't be executed unless the group of the local sources can't produce
a match. Among the same group all the sources are still executed parallel.