Unsupervised learning of control signals and their encodings in $\textit{C. elegans}$ whole-brain recordings