Search for a W′ boson decaying to a vector-like quark and a top or bottom quark in the all-jets final state