The mass layoffs come as the Raleigh bank works to right-size its scope and scale to remain competitive.