Discovering sparse transcription factor codes for cell states and state transitions during development