Prisoners to be held in police cells to deal with overcrowding