Military chaplains 'could be sacked for opposing gay marriage', says former minister