The optical Tamm states at the edges of a photonic crystal bounded by one or two layers of a strongly anisotropic nanocomposite