On the connectivity of proper colorings of random graphs and hypergraphs