Replace `.exists` with `EXISTS ()`
Replace `.exists` with `EXISTS ()`

`.exists` should not be used because it's an internal ActiveRecord
method, but we can easily generate the same sql query with `EXISTS`.

axilleas/gitlabhq,jirutka/gitlabhq,dreampet/gitlab,mmkassem/gitlabhq,jirutka/gitlabhq,stoplightio/gitlabhq,dreampet/gitlab,jirutka/gitlabhq,iiet/iiet-git,dreampet/gitlab,mmkassem/gitlabhq,iiet/iiet-git,axilleas/gitlabhq,stoplightio/gitlabhq,axilleas/gitlabhq,stoplightio/gitlabhq,mmkassem/gitlabhq,mmkassem/gitlabhq,dreampet/gitlab,stoplightio/gitlabhq,iiet/iiet-git,iiet/iiet-git,jirutka/gitlabhq,axilleas/gitlabhq