Fix ES for for non-default branches
This MR fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/1349 and one more not reported bug about exception when searching through the commits in non-default branch. Both bugs were introduced in https://gitlab.com/gitlab-org/gitlab-ce/commit/a5632e802b72db01c0fb0b8bec77c0fc28b41427
To fix them I had to refactor the code. I introduced new class
Gitlab::FileFinder to not duplicate our code that is responsible for non-ES search. In fact we use non-ES search for cases when ES is disabled or when we search in non-default branch.
Part of this MR should be backported to CE.