Formulations and Algorithms for General and Security Stackelberg Games