backport protected_branches_spec improvements from EE
backport protected_branches_spec improvements from EE

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