Union Bank of California is buying bank holding company Pacific Capital, in one of the largest bank deals in years.