Characterizing Causal Action Theories and Their Implementations in Answer Set Programming: Action Languages B, C, and Beyond