Topological phases and curvature-driven pattern formation in cholesteric shells